<?php

namespace App\Enums;

enum ContestWinnerStatusEnum: string
{
    /**
     * Enum representing the status of a contest.
     *
     * @var string
     */
    case PENDING = 'pending';

    case CONFIRMED = 'confirmed';

    case DECLINE = 'decline';

    public function label(): string
    {
        return match ($this) {
            self::PENDING => 'Pending',
            self::CONFIRMED => 'Confirmed',
            self::DECLINE => 'Declined',
            default => 'Unknown',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::PENDING => 'warning',
            self::CONFIRMED => 'success',
            self::DECLINE => 'danger',
            default => 'default',
        };
    }

    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }
}
