<?php

namespace App\Modules\HtlCampBooking\Application\ListBySchedule;

use App\Modules\BookingTour\Domain\IdBookingTour;
use App\Modules\HtlCampBooking\Domain\HtlCampBookingRepository;
use App\Modules\HtlCampBooking\Domain\ListByHtlCampScheduleHtlCampBooking;
use App\Modules\HtlCampBooking\Domain\ListHtlCampBooking;
use App\Modules\HtlCampSchedule\Domain\IdHtlCampSchedule;

final class HtlCampBookingByScheduleLister
{
    public function __construct(private HtlCampBookingRepository $repository)
    {
    }

    public function __invoke(IdHtlCampSchedule $idHtlCampSchedule, string $action)
    {
        return $this->repository->search(new ListByHtlCampScheduleHtlCampBooking($idHtlCampSchedule, $action));
    }
}
