<?php

declare(strict_types=1);

namespace App\Framework\Mail;

enum Priority: int
{
    case HIGHEST = 1;
    case HIGH = 2;
    case NORMAL = 3;
    case LOW = 4;
    case LOWEST = 5;

    public function toHeaderValue(): string
    {
        return match ($this) {
            self::HIGHEST, self::HIGH => 'high',
            self::NORMAL => 'normal',
            self::LOW, self::LOWEST => 'low',
        };
    }

    public function toImportanceValue(): string
    {
        return match ($this) {
            self::HIGHEST, self::HIGH => 'high',
            self::NORMAL => 'normal',
            self::LOW, self::LOWEST => 'low',
        };
    }
}
