<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\OptionsFieldGroups;

use AuxCF\Entities\FieldGroup\Enum\FieldGroupPositionEnum;
use AuxCF\Entities\FieldGroup\Enum\FieldGroupStyleEnum;
use AuxCF\Entities\FieldGroup\FieldGroupOptionsPageLocationEntity;
use AuxCF\Entities\FieldGroupEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\SearchSidebar\SearchSidebarSectionFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\SearchSidebar\SearchSidebarHeadingFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\SearchSidebar\SearchSidebarTitleFieldEntity;

class AcfSearchOptionsGroupEntity extends FieldGroupEntity
{
  public static string $key = 'aux_search';
  protected string $title = 'Search Page Sidebar Settings';

  // Position where the field group appears in the admin interface (Normal, Side, AfterTitle)
  protected FieldGroupPositionEnum $position = FieldGroupPositionEnum::AfterTitle;

  // Set the position of this field group on the aux-global-settings page. Sites Settings are set to 0. Search will display after that.
  protected int $menuOrder = 1;

  protected FieldGroupStyleEnum $style = FieldGroupStyleEnum::DEFAULT;


  protected array $initFields = [
    SearchSidebarTitleFieldEntity::class,
    SearchSidebarHeadingFieldEntity::class,
    SearchSidebarSectionFieldEntity::class,
  ];

  protected array $initLocations = [
    [ FieldGroupOptionsPageLocationEntity::class, 'aux-global-settings' ],
  ];
}
