<?php

namespace App\Modules\WebContact\Application\List;

use App\Modules\LeadBooking\Domain\IdLeadBooking;
use App\Modules\Shared\Domain\Bus\Query\QueryHandler;

final class ListWebContactQueryHandler implements QueryHandler
{
    public function __construct(private WebContactLister $inserter)
    {
    }

    public function __invoke(ListWebContactQuery $query): ListWebContactQueryResponse
    {
        return $this->inserter->__invoke(
            $query->getAction()
        );
    }
}
