<?php
declare(strict_types=1);

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

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 CollectionFeatureStandardFactoidFieldEntity extends RepeaterFieldEntity
{
  public static string $name = 'collection_feature_standard_factoid';
  protected string $label = 'Factoid';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Row;
  protected int $min = 1;
  protected ?int $max = 4;
  protected string $buttonLabel = 'Add Factoid';

  protected array $initFields = [
    CollectionFeatureFactoidHeadingFieldEntity::class,
    CollectionFeatureFactoidHeadersSwitchFieldEntity::class,
    CollectionFeatureFactoidSuperheaderFieldEntity::class,
    CollectionFeatureFactoidSubheaderFieldEntity::class,
    CollectionFeatureFactoidIconFieldEntity::class,
    CollectionFeatureFactoidContentFieldEntity::class,
    CollectionFeatureFactoidCitationFieldEntity::class,
  ];

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

}
