<?php

namespace App\Enums;

enum SupportTicketStatusEnum: string
{
    case OPEN = 'open';

    case REPLIED = 'replied';

    case CLOSE = 'close';

    public function label(): string
    {
        return match ($this) {
            self::OPEN => 'Open',
            self::REPLIED => 'Replied',
            self::CLOSE => 'Close',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::OPEN => 'warning',
            self::REPLIED => 'success',
            self::CLOSE => 'danger',
            default => 'warning',
        };
    }

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