<?php
declare(strict_types=1);

namespace WP_AUX\Enum;

use WP_AUX\Interfaces\OptionsEnumInterface;
use WP_AUX\Traits\EnumTraits;

enum BackgroundEnum: string implements OptionsEnumInterface
{
  use EnumTraits;

  case None = 'none';
  case Divider = 'divider';
  case Gray = 'gray';
  case Maroon = 'maroon';
  case Charcoal = 'charcoal';

  public const SETTING_LABEL = 'AUX background';

  public function label(): string
  {
    return match($this) {
      self::None => 'None',
      self::Divider => 'Divider',
      self::Gray => 'Gray',
      self::Maroon => 'Maroon',
      self::Charcoal => 'Charcoal',
    };
  }

  public function string(): string
  {
    return match($this) {
      self::None => '',
      self::Divider => 'divider',
      self::Gray => 'gray-100',
      self::Maroon => 'maroon',
      self::Charcoal => 'gray-900',
    };
  }

  public function isDark(): bool
  {
    return match($this) {
      self::Maroon => true,
      self::Charcoal => true,
      default => false,
    };
  }
}
