<?php

declare(strict_types=1);

namespace App\Shared\Infrastructure\ApiPlatform\Resource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Shared\Infrastructure\ApiPlatform\State\ModulesProvider;
use Symfony\Component\Serializer\Attribute\Groups;

#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/modules',
            normalizationContext: ['groups' => ['modules:read']],
            provider: ModulesProvider::class,
        ),
    ],
)]
final class ModulesResource
{
    /**
     * @var list<string>
     */
    #[Groups(['modules:read'])]
    public array $modules = [];
}
