<?php

namespace App\Enums;

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

enum UserRole: string implements HasColor, HasLabel
{
    case USER = 'user';
    case ADMIN = 'admin';
    case MODERATOR = 'moderator';

    public function getLabel(): string
    {
        return match ($this) {
            self::USER => __('enums.user_role.user'),
            self::ADMIN => __('enums.user_role.admin'),
            self::MODERATOR => __('enums.user_role.moderator'),
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::USER => 'gray',
            self::ADMIN => 'danger',
            self::MODERATOR => 'warning',
        };
    }
}
