<?php

namespace App\Enums;

use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasIcon;
use Filament\Support\Contracts\HasLabel;

enum InvoiceStatus: string implements HasColor, HasIcon, HasLabel
{
    case UNPAID = 'Not paid';
    case PAID   = 'Paid';
    case VOID   = 'Void';

    public function getLabel(): ?string
    {
        return $this->value;
    }

    public function getColor(): string|array|null
    {
        return match ($this) {
            self::UNPAID => 'warning',
            self::PAID   => 'success',
            self::VOID   => 'gray'
        };
    }

    public function getIcon(): ?string
    {
        return match ($this) {
            self::UNPAID => 'lucide-circle-x',
            self::PAID   => 'lucide-circle-check',
            self::VOID   => 'lucide-circle-slash',
        };
    }
}
