<?php

namespace App\Model;

final class OrganizationalUnitTypes
{
    public const string ORGANIZATIONAL_UNIT = 'organizational-unit';
    public const string CLASSROOMS_GROUP = 'classrooms-group';
    public const string CLASSROOM = 'classroom';
    public const string CLIENTS_GROUP = 'clients-group';

    private const array ORGANIZATIONAL_UNIT_TYPES = [
        self::ORGANIZATIONAL_UNIT => 'Unidad Organizativa',
        self::CLASSROOMS_GROUP => 'Grupo de aulas',
        self::CLASSROOM => 'Aula',
        self::CLIENTS_GROUP => 'Grupo de ordenadores',
    ];

    public static function getOrganizationalUnitTypes(): array
    {
        return self::ORGANIZATIONAL_UNIT_TYPES;
    }

    public static function getOrganizationalUnitType(string $organizationalUnit): ?string
    {
        return self::ORGANIZATIONAL_UNIT_TYPES[$organizationalUnit] ?? null;
    }

    public static function getOrganizationalUnitTypeKeys(): array
    {
        return array_keys(self::ORGANIZATIONAL_UNIT_TYPES);
    }
}