<?php

declare(strict_types=1);

namespace App\Framework\Console\Health;

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

    public function getColor(): string
    {
        return match ($this) {
            self::HEALTHY => 'green',
            self::WARNING => 'yellow',
            self::UNHEALTHY => 'red',
        };
    }

    public function getSymbol(): string
    {
        return match ($this) {
            self::HEALTHY => '✓',
            self::WARNING => '⚠',
            self::UNHEALTHY => '✗',
        };
    }
}
