<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\SidebarComponents\CaptionedMedia;

use AuxCF\Entities\Field\RadioFieldEntity;
use AuxCF\Entities\Field\Enum\ChoicesFieldLayoutEnum;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Entities\AuxCF\Fields\CustomContent\CustomContentSidebarSelectFieldEntity;
use WP_AUX\Enum\SidebarComponentEnum;

class SidebarCaptionedMediaTypeFieldEntity extends RadioFieldEntity
{
  public static string $name = 'sidebar_captioned_media_type';
  public static array $replacesFields = ['sidebar_captioned_media_media_switch'];
  protected string $label = 'Image or Embedded Video?';
  protected mixed $choices = [
    'image' => 'Image',
    'video' => 'Embedded Video',
  ];
  protected ChoicesFieldLayoutEnum $layout = ChoicesFieldLayoutEnum::Horizontal;

  protected array $initConditionalLogic = [
    [
      [ CustomContentSidebarSelectFieldEntity::class, OperatorEnum::EQUALS, SidebarComponentEnum::CaptionedMedia ],
    ]
  ];
}
