| 12345678910111213141516171819202122232425262728 | <?php
namespace App\Enums\Accounting;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;
enum BillStatus: string implements HasColor, HasLabel
{
    case Partial = 'partial';
    case Paid = 'paid';
    case Unpaid = 'unpaid';
    case Void = 'void';
    public function getLabel(): ?string
    {
        return $this->name;
    }
    public function getColor(): string | array | null
    {
        return match ($this) {
            self::Partial, self::Unpaid => 'warning',
            self::Paid => 'success',
            self::Void => 'gray',
        };
    }
}
 |