<?php

namespace App\Domain\Manga\Infrastructure\CommandHandler;

use App\Domain\Manga\Application\Command\FetchMangaChapters;
use App\Domain\Manga\Application\CommandHandler\FetchMangaChaptersHandler;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

#[AsMessageHandler]
readonly class SymfonyFetchMangaChaptersHandler
{
    public function __construct(
        private FetchMangaChaptersHandler $handler
    ) {
    }

    public function __invoke(FetchMangaChapters $command): void
    {
        $this->handler->handle($command);
    }
}
