<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\CollectionFeature\Collections\LinkList;

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\RepeaterFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Entities\AuxCF\Fields\CollectionFeature\CollectionFeatureTypeFieldEntity;
use WP_AUX\Enum\CollectionFeatureEnum;

class CollectionFeatureLinkListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'collection_feature_link_list';
  protected string $label = 'Link List';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Row;
  protected int $min = 1;
  protected ?int $max = 8;
  protected string $buttonLabel = 'Add Link List Item';
  protected string $instructions = 'Select link destination and link text for each list item.';

  protected array $initFields = [
    CollectionFeatureLinkListLinkFieldEntity::class,
  ];

  protected array $initConditionalLogic = [
    [
      [ CollectionFeatureTypeFieldEntity::class, OperatorEnum::EQUALS, CollectionFeatureEnum::LinkList ],
    ]
  ];

}
