<?php

namespace App\Model;

final class ClientStatus
{
    public const string OFF = 'off';
    public const string INITIALIZING = 'initializing';
    public const string DISCONNECTED = 'disconnected';
    public const string TURNING_OFF = 'turning-off';
    public const string OG_LIVE = 'og-live';
    public const string BUSY = 'busy';
    public const string LINUX = 'linux';
    public const string LINUX_SESSION = 'linux-session';
    public const string MACOS = 'macos';
    public const string MACOS_SESSION = 'macos-session';
    public const string WINDOWS = 'windows';
    public const string WINDOWS_SESSION = 'windows-session';

    private const array CLIENT_STATUSES = [
        self::OFF => 'Apagado',
        self::TURNING_OFF => 'Apagando',
        self::INITIALIZING => 'Inicializando',
        self::DISCONNECTED => 'Conexión perdida',
        self::OG_LIVE => 'OG Live',
        self::BUSY => 'Ocupado',
        self::LINUX => 'Linux',
        self::LINUX_SESSION => 'Sesión Linux',
        self::MACOS => 'MacOS',
        self::MACOS_SESSION => 'Session en MacOS',
        self::WINDOWS => 'Windows',
        self::WINDOWS_SESSION => 'Sesión Windows',
    ];
    public static function getClientStatuses(): array
    {
        return self::CLIENT_STATUSES;
    }

    public static function getClientStatus(string $clientStatus): ?string
    {
        return self::CLIENT_STATUSES[$clientStatus] ?? null;
    }

    public static function getClientStatusKeys(): array
    {
        return array_keys(self::CLIENT_STATUSES);
    }
}