<?php

declare(strict_types=1);

namespace App\ApiResource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\QueryParameter;
use App\State\OvertimeContingentPrintProvider;

#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/overtime-contingent/print',
            provider: OvertimeContingentPrintProvider::class,
            parameters: [
                new QueryParameter(key: 'year', required: true),
                new QueryParameter(key: 'siteIds', required: false),
            ],
            security: "is_granted('ROLE_USER')"
        ),
    ]
)]
final class OvertimeContingentPrint {}
