<?php

namespace App\Modules\LeadBookingTourPassenger\Application\Create;

use App\Modules\LeadBookingTourPassenger\Application\Create\LeadBookingTourPassengerInserterResponse;
use App\Modules\LeadBookingTourPassenger\Domain\LeadBookingTourPassenger;
use App\Modules\LeadBookingTourPassenger\Domain\LeadBookingTourPassengerRepository;

final class LeadBookingTourPassengerInserter
{
    public function __construct(private LeadBookingTourPassengerRepository $repository)
    {
    }

    public function __invoke(
        LeadBookingTourPassenger $leadBookingTourPassenger
    ): LeadBookingTourPassengerInserterResponse {
        return new LeadBookingTourPassengerInserterResponse($this->repository->insert($leadBookingTourPassenger));
    }
}
