<?php

namespace App\Modules\StatusGroupProvider\Application\List;

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

final class ListStatusGroupProviderQueryHandler implements QueryHandler
{
    public function __construct(private StatusGroupProviderLister $inserter)
    {
    }

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