<?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;

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

    /** @param list<string> $modules */
    public function __construct(array $modules = [])
    {
        $this->modules = $modules;
    }
}
