<?php

namespace App\Modules\BookingEquipmentPassenger\Application\List;

use App\Modules\BookingEquipmentPassenger\Domain\BookingEquipmentPassengerRepository;
use App\Modules\BookingEquipmentPassenger\Domain\CriteriaListBookingEquipmentPassenger;

final class BookingEquipmentPassengerLister
{
    public function __construct(private BookingEquipmentPassengerRepository $repository) {}

    public function __invoke(?array $ids, ?array $idBookingEquipments, ?array $idBookingTourPassengers)
    {
        return $this->repository->search(new CriteriaListBookingEquipmentPassenger(
            $ids,
            $idBookingEquipments,
            $idBookingTourPassengers
        ));
    }
}
