<?php

declare(strict_types=1);

namespace App\Domain\Backup\Enums;

enum BackupStatus: string
{
    case Pending = 'pending';
    case Running = 'running';
    case Completed = 'completed';
    case Failed = 'failed';

    public function label(): string
    {
        return match ($this) {
            self::Pending => 'Bekliyor',
            self::Running => 'Çalışıyor',
            self::Completed => 'Tamamlandı',
            self::Failed => 'Başarısız',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Pending => 'amber',
            self::Running => 'blue',
            self::Completed => 'green',
            self::Failed => 'red',
        };
    }
}
