<?php

namespace App\Enums;

enum UserRole: string
{
    case SuperAdmin   = 'super_admin';
    case CompanyAdmin = 'company_admin';
    case Employee     = 'employee';
    case Customer     = 'customer';

    public function label(): string
    {
        return match ($this) {
            self::SuperAdmin   => 'Súper Administrador',
            self::CompanyAdmin => 'Administrador de Empresa',
            self::Employee     => 'Empleado',
            self::Customer     => 'Cliente',
        };
    }

    public function dashboardRoute(): string
    {
        return match ($this) {
            self::SuperAdmin   => 'superadmin.dashboard',
            self::CompanyAdmin => 'tenant.dashboard',
            self::Employee     => 'employee.dashboard',
            self::Customer     => 'customer.dashboard',
        };
    }
}
