<?php

namespace App\Modules\BookingTourPassenger\Application\GetItem;

use App\Modules\BookingTourPassenger\Domain\BookingTourPassengerRepository;
use App\Modules\BookingTourPassenger\Domain\IdBookingTourPassenger;
use App\Modules\BookingTourPassenger\Domain\ItemsBookingTourPassenger;

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

    public function __invoke(
        IdBookingTourPassenger $id,
    ) {
        return $this->repository->search(new ItemsBookingTourPassenger($id));
    }
}
