<?php

namespace App\Modules\BookingTourPassenger\Application\ListByPassenger;

use App\Modules\BookingTourPassenger\Domain\BookingTourPassengerRepository;
use App\Modules\Passenger\Domain\IdPassenger;

final class BookingTourPassengerPassengerLister
{
    public function __construct(private BookingTourPassengerRepository $repository)
    {
    }

    public function __invoke(IdPassenger $idPassenger): BookingTourPassengerListByPassengerResponse
    {
        return new BookingTourPassengerListByPassengerResponse($this->repository->listByPassenger($idPassenger, 'all_delete'));
    }
}
