<?php

namespace App\Modules\PaxInformationRoomPassenger\Application\List;

use App\Modules\PaxInformation\Domain\IdPaxInformation;
use App\Modules\PaxInformationRoom\Domain\IdPaxInformationRoom;
use App\Modules\PaxInformationRoomPassenger\Domain\ListPaxInformationRoomPassenger;
use App\Modules\PaxInformationRoomPassenger\Domain\PaxInformationRoomPassenger;
use App\Modules\PaxInformationRoomPassenger\Domain\PaxInformationRoomPassengerRepository;

final class PaxInformationRoomPassengerLister
{
    public function __construct(private PaxInformationRoomPassengerRepository $repository) {}

    /**
     * @return PaxInformationRoomPassenger[] $search
     */
    public function __invoke(array $idsPaxInformationRoom, string $action)
    {
        return $this->repository->search(new ListPaxInformationRoomPassenger($idsPaxInformationRoom, $action));
    }
}
