<?php
declare(strict_types=1);

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

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\RepeaterFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Enum\CtaTypes\AllCtaTypesEnum;

class SidebarCardLinkRepeaterFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'sidebar_card_link_repeater';
  protected string $label = 'Card Links';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Block;
  protected int $min = 1;
  protected ?int $max = 3;
  protected string $buttonLabel = 'Add CTA';

  protected array $initFields = [
    SidebarCardLinkFieldEntity::class,
  ];

  protected array $initConditionalLogic = [
    [
      [ SidebarCardsCtaTypeFieldEntity::class, OperatorEnum::EQUALS, AllCtaTypesEnum::Links ],
    ]
  ];
}
