<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\OptionsFields\SearchSidebar;

use AuxCF\Entities\Field\SelectFieldEntity;
use AuxCF\Entities\Settings\Enum\IntSwitchEnum;

class SearchSidebarFilterSourceFieldEntity extends SelectFieldEntity
{
  public static string $name = 'aux_search_sidebar_section_filter_source';

  protected string $label = 'Field Source';
  protected string $instructions = 'Type of data to select filter options from';
  protected IntSwitchEnum $allowNull = IntSwitchEnum::On;
  protected mixed $choices = [];

  protected function init(): void
  {
    $this->choices = function() {
      $choices = [
        'post_type' => 'Post Types',
        'taxonomy' => 'Terms',
      ];

      return $choices;
    };
  }
}
