<?php
declare(strict_types=1);
namespace App\Platform\Soc\Event;

enum EventSeverity: string
{
    case INFO = 'info';
    case WARNING = 'warning';
    case CRITICAL = 'critical';

    public static function fromInput(string $value): self
    {
        return match (strtolower(trim($value))) {
            'critical', 'error', 'alert', 'emergency' => self::CRITICAL,
            'warning', 'warn', 'notice' => self::WARNING,
            default => self::INFO,
        };
    }
}
