<?php
declare(strict_types=1);

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

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 CollectionFeatureIconListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'collection_feature_icon_list';
  protected string $label = 'Icon List';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Row;
  protected int $min = 1;
  protected ?int $max = 6;
  protected string $buttonLabel = 'Add Icon List Item';

  protected array $initFields = [
    CollectionFeatureIconListIconFieldEntity::class,
    CollectionFeatureIconListItemTextFieldEntity::class,
  ];

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

}
