<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\LinkList;

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\RepeaterFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;

class LinkListLinkNestedListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'link_nested_list';
  protected string $label = 'Nested Links';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Block;
  protected string $buttonLabel = 'Add Nested Link';
  protected ?int $max = 3;
  protected int $min = 1;

  protected array $initFields = [
    LinkListNestedLinkFieldEntity::class,
    LinkListNestedDescriptionSwitchFieldEntity::class,
    LinkListNestedDescriptionFieldEntity::class,
  ];

  protected array $initConditionalLogic = [
    [[ LinkListLinkNestedSwitchFieldEntity::class, OperatorEnum::EQUALS, '1' ]],
  ];
}
