<?php

declare(strict_types=1);

namespace App\ApiResource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Patch;
use App\State\EmployeePaidLeaveDaysProcessor;
use App\State\EmployeePaidLeaveDaysProvider;

#[ApiResource(
    operations: [
        new Patch(
            uriTemplate: '/employees/{id}/paid-leave-days',
            security: "is_granted('ROLE_ADMIN')",
            provider: EmployeePaidLeaveDaysProvider::class,
            processor: EmployeePaidLeaveDaysProcessor::class
        ),
    ],
    paginationEnabled: false
)]
final class EmployeePaidLeaveDaysInput
{
    public float $paidLeaveDays = 0.0;
    public ?int $year           = null;
}
