<?php

declare(strict_types=1);

namespace Kylin\Manufacturing\Enums;

/**
 * 优先级
 */
enum Priority: string
{
    case Low = 'low';
    case Medium = 'medium';
    case High = 'high';
    case Urgent = 'urgent';

    public function label(): string
    {
        return match ($this) {
            self::Low => '低',
            self::Medium => '中',
            self::High => '高',
            self::Urgent => '紧急',
        };
    }

    public function badgeClass(): string
    {
        return match ($this) {
            self::Low => 'bg-secondary',
            self::Medium => 'bg-info',
            self::High => 'bg-warning',
            self::Urgent => 'bg-danger',
        };
    }
}
