<?php

namespace App\Domain\Manga\Infrastructure\ApiPlatform\Resource;

use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use App\Domain\Manga\Infrastructure\ApiPlatform\State\Provider\DownloadVolumeProvider;

#[ApiResource(
    shortName: 'Cbz',
    operations: [
        new Get(
            uriTemplate: '/mangas/{id}/volumes/{volume}/download',
            provider: DownloadVolumeProvider::class,
            output: false,
            name: 'download_manga_volume'
        )
    ]
)]
class DownloadVolumeResource
{
    public function __construct(
        public string $id,
        public int $volume
    ) {
    }
}
