<?php

namespace App\Modules\BookingTour\Application\Index;

use App\Modules\BookingTour\Domain\AlterIndexBookingTour;
use App\Modules\BookingTour\Domain\BookingTourRepository;
use App\Modules\BookingTour\Domain\IdBookingTour;

final class BookingTourIndexer
{
    public function __construct(
        private BookingTourRepository $repository
    ) {}

    public function __invoke(
        IdBookingTour $id,
    ) {
        return $this->repository->findByCriteria(new AlterIndexBookingTour($id));
    }
}
