<?php

namespace App\Modules\HtlCampBooking\Application\Update;

use App\Modules\HtlCampBooking\Domain\DuplicateHtlCampBooking;
use App\Modules\HtlCampBooking\Domain\HtlCampBooking;
use App\Modules\HtlCampBooking\Domain\HtlCampBookingRepository;

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

    public function __invoke(HtlCampBooking $model)
    {
        // $this->repository->search(new DuplicateHtlCampBooking(
        //     $model->id(),
        //     $model->dateStart(),
        //     $model->idBookingTour(),
        //     true
        // ));
        return $this->repository->update($model);
    }
}
