<?php

declare(strict_types=1);

namespace App\Domain\Manga\Infrastructure\MessageHandler;

use App\Domain\Manga\Application\EventListener\ChapterImportedEventListener;
use App\Domain\Shared\Domain\Event\ChapterImported;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

#[AsMessageHandler]
readonly class ChapterImportedMessageHandler
{
    public function __construct(private ChapterImportedEventListener $listener)
    {
    }

    public function __invoke(ChapterImported $event): void
    {
        $this->listener->__invoke($event);
    }
}
