<?php

namespace App\Modules\Lead\Application\List;

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

final class LeadListerQueryHandler implements QueryHandler
{
    public function __construct(private LeadLister $inserter)
    {
    }

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