<?php

declare(strict_types=1);

namespace App\ApiResource;

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

#[ApiResource(
    operations: [
        new Get(
            uriTemplate: '/yearly-hours/print',
            provider: EmployeeYearlyHoursPrintProvider::class,
            parameters: [
                new QueryParameter(key: 'employeeId', required: true),
                new QueryParameter(key: 'year', required: true),
            ],
            security: "is_granted('ROLE_USER')"
        ),
    ]
)]
final class EmployeeYearlyHoursPrint {}
