<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxCF\Fields\Card;

use AuxCF\Entities\Field\Enum\ImageFieldPreviewSizeEnum;
use AuxCF\Entities\Field\Enum\ImageFieldReturnFormatEnum;
use AuxCF\Entities\Field\ImageFieldEntity;
use AuxCF\Entities\Settings\Enum\OperatorEnum;
use WP_AUX\Entities\AuxCF\Fields\Section\SectionCardsMediaOptionsFieldEntity;
use WP_AUX\Entities\AuxCF\Fields\FeaturedCard\CardsMediaOptionsFieldEntity;
use WP_AUX\Enum\CardsMediaEnum;

class CardImageFieldEntity extends ImageFieldEntity
{
  public static string $name = 'card_image';
  protected string $label = 'Card Image';
  protected ImageFieldReturnFormatEnum $returnFormat = ImageFieldReturnFormatEnum::Array;
  protected ImageFieldPreviewSizeEnum $previewSize = ImageFieldPreviewSizeEnum::Medium;

  protected array $initConditionalLogic = [
    [
      [ SectionCardsMediaOptionsFieldEntity::class, OperatorEnum::EQUALS, CardsMediaEnum::Image],
      [ CardsMediaOptionsFieldEntity::class, OperatorEnum::EQUALS, CardsMediaEnum::Image]
    ],
  ];
}