<?php
declare(strict_types=1);

namespace WP_AUX\Enum;

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

enum SiteHeaderVariationEnum: string implements OptionsEnumInterface
{
  use EnumTraits;

  case University = 'university';
  case UniversityProgram = 'university-program';
  case Division = 'division';
  case Department = 'department';
  case Program = 'program';

  const DEFAULT = self::Division;

  public const SETTING_LABEL = 'Site Header Variation';

  public function label(): string
  {
    return match($this) {
      self::University => 'University',
      self::UniversityProgram => 'University Program',
      self::Division => 'College, Branch Campus, or Division',
      self::Department => 'Department',
      self::Program => 'Program or Subunit',
    };
  }

  public function headerClass(): string
  {
    return match($this) {
      self::University => 'site-header--university site-header--stories',
      self::UniversityProgram => 'site-header--alt',
      self::Division => 'site-header--alt',
      self::Department => 'site-header--alt site-header--department',
      self::Program => 'site-header--alt',
    };
  }

  public function mainHeaderModifier(): string
  {
    return match($this) {
      self::University => 'maroon',
      self::UniversityProgram => '',
      self::Division => '',
      self::Department => '',
      self::Program => '',
    };
  }

  public function utilityHasCollege(): bool
  {
    return match($this) {
      self::University => false,
      self::UniversityProgram => false,
      self::Division => false,
      self::Department => true,
      self::Program => false,
    };
  }

  public function useLockup(): bool
  {
    return match($this) {
      self::University => false,
      self::UniversityProgram => false,
      self::Division => true,
      self::Department => true,
      self::Program => false,
    };
  }
}
