<?php

namespace App\Domain\HR\Enums;

enum PayslipStatus: string
{
    case Draft = 'draft';
    case PendingApproval = 'pending_approval';
    case Approved = 'approved';
    case Paid = 'paid';
    case Cancelled = 'cancelled';

    public function label(): string
    {
        return match($this) {
            self::Draft => 'مسودة',
            self::PendingApproval => 'بانتظار الموافقة',
            self::Approved => 'موافق عليها',
            self::Paid => 'مدفوعة',
            self::Cancelled => 'ملغاة',
        };
    }

    public function badgeColor(): string
    {
        return match($this) {
            self::Draft => 'gray',
            self::PendingApproval => 'amber',
            self::Approved => 'blue',
            self::Paid => 'green',
            self::Cancelled => 'red',
        };
    }
}
