<?php

namespace App\Modules\Credential\Application\List;

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

final class ListCredentialQueryHandler implements QueryHandler
{
    public function __construct(private CredentialLister $lister)
    {
    }

    public function __invoke(ListCredentialQuery $query): ListCredentialResponse
    {
        return new ListCredentialResponse($this->lister->__invoke());
    }
}
