<?php

namespace App\Modules\ApplicationScope\Application\List;

use App\Modules\ApplicationScope\Domain\ApplicationScopeRepository;
use App\Modules\ApplicationScope\Domain\ListApplicationScopesByApplication;

final class ApplicationScopeLister
{
    public function __construct(
        private ApplicationScopeRepository  $applicationKeyRepository,
    )
    {
    }

    public function __invoke(
        ListApplicationScopeQuery $query
    )
    {
        return $this->applicationKeyRepository->find(new ListApplicationScopesByApplication($query->idApplication));
    }
}
