<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\OptionsFields\PostType;

use AuxCF\Entities\Field\Enum\RepeaterFieldLayoutEnum;
use AuxCF\Entities\Field\GroupFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\SearchSidebar\SearchSidebarSectionFieldEntity;

/**
 * Configurations and settings for post type archives, found under the dashboard
 * sidebar menu for every post type with an archive
 * @since 1.0.0
 */
class PostTypeSearchFieldEntity extends GroupFieldEntity
{
  /**
   * Pattern used to generate unique field names for use on post type archives.
   * The %s placeholder will be replaced with the post type name.
   * Example: 'aux_search_post' for 'post' type
   * @var string
   * @see \WP_AUX\Entities\AuxCF\OptionsFieldGroups\AcfPostTypeOptionsGroupEntity::$fieldsWildcard
   * @since 1.0.0
   */
  public static string $namePattern = 'aux_search_%s';

  protected string $label = 'Search';
  protected RepeaterFieldLayoutEnum $layout = RepeaterFieldLayoutEnum::Block;

  protected array $initFields = [
    PostTypeSearchSwitchFieldEntity::class,
    PostTypeSearchSectionFieldEntity::class,
  ];
}
