<?php

namespace App\Enums;

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

enum StatutAnnonce: string implements HasLabel, HasColor
{
    case Brouillon = 'brouillon';
    case EnAttentePaiement = 'en_attente_paiement';
    case EnValidation = 'en_validation';
    case Publiee = 'publiee';
    case Expiree = 'expiree';
    case Rejetee = 'rejetee';

    public function getLabel(): string
    {
        return match ($this) {
            self::Brouillon => 'Brouillon',
            self::EnAttentePaiement => 'En attente de paiement',
            self::EnValidation => 'En validation',
            self::Publiee => 'Publiée',
            self::Expiree => 'Expirée',
            self::Rejetee => 'Rejetée',
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::Brouillon => 'gray',
            self::EnAttentePaiement => 'warning',
            self::EnValidation => 'info',
            self::Publiee => 'success',
            self::Expiree => 'gray',
            self::Rejetee => 'danger',
        };
    }
}