<?php
declare(strict_types=1);

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

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

  protected array $initFields = [
    CollectionFeatureDescriptionListTermFieldEntity::class,
    CollectionFeatureDescriptionListDescriptionFieldEntity::class,
  ];

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

}
