<?php

declare(strict_types=1);

namespace App\Domain\Manga\Infrastructure\MessageHandler;

use App\Domain\Manga\Application\EventListener\VolumeImportedEventListener;
use App\Domain\Shared\Domain\Event\VolumeImported;
use Symfony\Component\Messenger\Attribute\AsMessageHandler;

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

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