<?php

namespace App\Domain\Document\Enums;

enum DocumentStatus: string
{
    case Pending = 'pending';
    case Approved = 'approved';
    case Rejected = 'rejected';
    case Expired = 'expired';

    public function label(): string
    {
        return match ($this) {
            self::Pending => 'في الانتظار',
            self::Approved => 'معتمد',
            self::Rejected => 'مرفوض',
            self::Expired => 'منتهي الصلاحية',
        };
    }

    public function badgeColor(): string
    {
        return match ($this) {
            self::Pending => 'yellow',
            self::Approved => 'green',
            self::Rejected => 'red',
            self::Expired => 'gray',
        };
    }
}
