<?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\Global\GlobalAnalyticsTabFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\GlobalAuxVersionNextSwitchFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\GlobalDefaultsTabFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\GlobalShareImageFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\GoogleAnalyticsFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\GtmFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\SiteOwnerFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\SiteTechnicalContactFieldEntity;
use WP_AUX\Entities\AuxCF\OptionsFields\Global\TrackingMethodFieldEntity;

/**
 * AcfGlobalOptionsGroupEntity extends FieldGroupEntity to create a custom ACF field group
 * for global site settings. It configures the field group's appearance, position, and
 * content within the WordPress admin interface.
 *
 * It creates a field group that appears on an options page, with the slug 'aux-global-settings'
 * and contains fields for site-wide configuration options.
 *
 * @since 1.0.0
 */
class AcfGlobalOptionsGroupEntity extends FieldGroupEntity
{
  public static string $key = 'aux_site';
  protected string $title = 'Site Settings';
  protected FieldGroupPositionEnum $position = FieldGroupPositionEnum::AfterTitle;
  protected int $menuOrder = 0;
  protected FieldGroupStyleEnum $style = FieldGroupStyleEnum::DEFAULT;

  protected array $initFields = [
    SiteOwnerFieldEntity::class,
    SiteTechnicalContactFieldEntity::class,
    GlobalAuxVersionNextSwitchFieldEntity::class,
    GlobalAnalyticsTabFieldEntity::class,
    TrackingMethodFieldEntity::class,
    GoogleAnalyticsFieldEntity::class,
    GtmFieldEntity::class,
    GlobalDefaultsTabFieldEntity::class,
    GlobalShareImageFieldEntity::class,
  ];

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