<?php

namespace App\Domain\Manga\Infrastructure\MessageHandler;

use App\Domain\Manga\Application\EventListener\MangaCreatedEventListener;
use App\Domain\Manga\Domain\Event\MangaCreated;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

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

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