<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\LinkListMultiList;

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

class LinkListMultiListLinkNestedListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'multi_list_link_nested_list';
  protected string $label = 'Nested Links';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Block;
  protected string $buttonLabel = 'Add Nested Link';
  protected int $min = 1;

  protected array $initFields = [
    LinkListMultiListNestedLinkFieldEntity::class,
    LinkListMultiListNestedDescriptionSwitchFieldEntity::class,
    LinkListMultiListNestedDescriptionFieldEntity::class,
  ];

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