<?php
declare(strict_types=1);

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

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 SidebarIconListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'sidebar_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 = [
    SidebarIconListIconFieldEntity::class,
    SidebarIconListItemTextFieldEntity::class,
    SidebarIconListDescriptionSwitchFieldEntity::class,
    SidebarIconListDescriptionFieldEntity::class,
  ];

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

}
