<?php
declare(strict_types=1);

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

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

  protected array $initFields = [
    SidebarLinkListLinkFieldEntity::class,
    SidebarLinkListDescriptionSwitchFieldEntity::class,
    SidebarLinkListDescriptionFieldEntity::class,
  ];

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

}
