<?php

declare(strict_types=1);

namespace App\Administration\Infrastructure\Api\Resource;

use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Administration\Infrastructure\Api\Provider\MyRolesProvider;

#[ApiResource(
    shortName: 'MyRoles',
    operations: [
        new Get(
            uriTemplate: '/me/roles',
            provider: MyRolesProvider::class,
            name: 'get_my_roles',
        ),
    ],
)]
final class MyRolesOutput
{
    #[ApiProperty(identifier: true, readable: false)]
    public string $id = 'me';

    /** @var array<array{value: string, label: string}> */
    public array $roles = [];

    public string $activeRole = '';

    public string $activeRoleLabel = '';
}
