<?php

declare(strict_types=1);

namespace App\Domain\Manga\Infrastructure\MessageHandler;

use App\Domain\Manga\Application\EventListener\ChapterScrapedEventListener;
use App\Domain\Shared\Domain\Event\ChapterScraped;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

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

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