<?php

namespace Kylin\Catering\Enums;

/**
 * 过期预警级别
 */
enum ExpiryAlertLevel: string
{
    case Notice = 'notice';     // 15天提醒
    case Warning = 'warning';   // 7天警告
    case Urgent = 'urgent';     // 3天紧急

    public function label(): string
    {
        return match ($this) {
            self::Notice => '提醒',
            self::Warning => '警告',
            self::Urgent => '紧急',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Notice => 'info',
            self::Warning => 'warning',
            self::Urgent => 'danger',
        };
    }
}
