<?php

namespace App\Model;

final class TraceStatus
{
    public const string PENDING = 'pending';
    public const string IN_PROGRESS = 'in-progress';
    public const string SUCCESS = 'success';
    public const string FAILED = 'failed';
    public const string CANCELLED = 'cancelled';
    public const string SENT = 'sent';
    public const string BUSY = 'busy';

    private const array STATUS = [
        self::PENDING => 'Pendiente',
        self::IN_PROGRESS => 'En progreso',
        self::SUCCESS => 'Finalizado con éxito',
        self::FAILED => 'Fallido',
        self::CANCELLED => 'Cancelado',
        self::SENT => 'Enviado',
        self::BUSY => 'Ocupado',
    ];

    public static function getStatus(): array
    {
        return self::STATUS;
    }

    public static function getTraceStatus(string $status): ?string
    {
        return self::STATUS[$status] ?? null;
    }

    public static function getStatusKeys(): array
    {
        return array_keys(self::STATUS);
    }
}