<?php

namespace App\Enums;

enum PaymentStatus: string
{
    case Pending   = 'pending';
    case Paid      = 'paid';
    case Failed    = 'failed';
    case Refunded  = 'refunded';
    case Cancelled = 'cancelled';

    public function label(): string
    {
        return match ($this) {
            self::Pending   => 'Pendiente',
            self::Paid      => 'Pagado',
            self::Failed    => 'Rechazado',
            self::Refunded  => 'Reembolsado',
            self::Cancelled => 'Cancelado',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Pending   => 'amber',
            self::Paid      => 'emerald',
            self::Failed    => 'rose',
            self::Refunded  => 'indigo',
            self::Cancelled => 'gray',
        };
    }
}
