<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\CollectionFeature\Collections\SocialLinks;

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\RepeaterFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Entities\AuxCF\Fields\CollectionFeature\CollectionFeatureTypeFieldEntity;
use WP_AUX\Enum\CollectionFeatureEnum;

class CollectionFeatureSocialLinkListFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'collection_feature_social_links';
  protected string $label = 'Social Links';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Row;
  protected int $min = 1;
  protected ?int $max = 8;
  protected string $buttonLabel = 'Add Link List Item';

  protected array $initFields = [
    CollectionFeatureSocialLinksSelectFieldEntity::class,
    CollectionFeatureSocialLinksHandleFieldEntity::class,
    CollectionFeatureSocialLinksLinkFieldEntity::class,
  ];

  protected array $initConditionalLogic = [
    [
      [ CollectionFeatureTypeFieldEntity::class, OperatorEnum::EQUALS, CollectionFeatureEnum::SocialLinks ],
    ]
  ];

}
