<?php

namespace App\Enums;

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

enum OrderStatus: string implements HasColor, HasIcon, HasLabel
{
    case DRAFT      = 'Draft';
    case APPROVED   = 'Approved';
    case PRODUCTION = 'Production';
    case SHIPPED    = 'Shipped';
    case INVOICED   = 'Invoiced';

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

    public function getColor(): string|array|null
    {
        return match ($this) {
            self::DRAFT      => 'gray',
            self::APPROVED   => 'success',
            self::PRODUCTION => 'primary',
            self::SHIPPED    => 'warning',
            self::INVOICED   => 'invoiced',
        };
    }

    public function getIcon(): ?string
    {
        return match ($this) {
            self::DRAFT      => 'lucide-pencil',
            self::APPROVED   => 'lucide-check-check',
            self::PRODUCTION => 'lucide-refresh-cw',
            self::SHIPPED    => 'lucide-send',
            self::INVOICED   => 'lucide-credit-card',
        };
    }
}
