<?php

namespace App\Enums;

use App\Traits\Enums\WithCommentEnum;
use App\Traits\Enums\WithValueEnum;

enum UserRole: string
{
    use WithCommentEnum, WithValueEnum;

    case Developer = 'Developer';
    case Owner = 'Owner';
    case Leader = 'Leader';
    case Admin = 'Admin';
    case Partner = 'Partner';
    case Customer = 'Customer';

    public function label(): string
    {
        return match ($this) {
            self::Developer => 'Developer',
            self::Owner => 'Owner',
            self::Leader => 'Leader',
            self::Admin => 'Admin',
            self::Partner => 'Partner',
            self::Customer => 'Customer',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::Developer => 'purple',
            self::Owner => 'emerald',
            self::Leader => 'blue',
            self::Admin => 'orange',
            self::Partner => 'cyan',
            self::Customer => 'gray',
        };
    }
}
