<?php

declare(strict_types=1);

namespace App\ApiResource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\GetCollection;
use App\State\ScopedEmployeeProvider;

#[ApiResource(
    operations: [
        new GetCollection(
            uriTemplate: '/employees/scoped',
            normalizationContext: ['groups' => ['employee:read', 'site:read']],
            security: "is_granted('ROLE_USER')",
            provider: ScopedEmployeeProvider::class,
            paginationEnabled: false
        ),
    ]
)]
final class ScopedEmployee {}
