<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\SidebarComponents\DescriptionList;

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\RepeaterFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Entities\AuxCF\Fields\CustomContent\CustomContentSidebarSelectFieldEntity;
use WP_AUX\Enum\SidebarComponentEnum;

class SidebarDescriptionListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'sidebar_desc_list';
  protected string $label = 'Description List';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Row;
  protected int $min = 1;
  protected string $buttonLabel = 'Add Description List Item';

  protected array $initFields = [
    SidebarDescriptionListTermFieldEntity::class,
    SidebarDescriptionListDescriptionFieldEntity::class,
  ];

  protected array $initConditionalLogic = [
    [
      [ CustomContentSidebarSelectFieldEntity::class, OperatorEnum::EQUALS, SidebarComponentEnum::DescList ],
    ]
  ];

}
