<?php

declare(strict_types=1);

namespace App\Framework\Health;

enum HealthStatus: string
{
    case HEALTHY = 'healthy';
    case WARNING = 'warning';
    case UNHEALTHY = 'unhealthy';

    public function getColor(): string
    {
        return match($this) {
            self::HEALTHY => '#30d158',
            self::WARNING => '#ff9500',
            self::UNHEALTHY => '#ff453a'
        };
    }

    public function getIcon(): string
    {
        return match($this) {
            self::HEALTHY => '✅',
            self::WARNING => '⚠️',
            self::UNHEALTHY => '❌'
        };
    }

    public function getPriority(): int
    {
        return match($this) {
            self::UNHEALTHY => 1,
            self::WARNING => 2,
            self::HEALTHY => 3
        };
    }
}
