<?php

namespace Modules\Booking\Data;

use Modules\Booking\Enums\BookingChannel;

readonly class CreateBookingData
{
    /**
     * @param  list<VehicleSelectionData>  $selections  One or more Vehicle Option
     *                                                  selections (e.g. front_seat + back_seat) — domain.md §2.
     * @param  list<VehicleSelectionData>|null  $returnSelections  Same shape as $selections,
     *                                                             priced independently against $returnEvRouteId. Presence of
     *                                                             $returnEvRouteId is the round-trip signal (domain.md §2b).
     */
    public function __construct(
        public int $evRouteId,
        public int $departureTimeSlotId,
        public string $travelDate,
        public array $selections,
        public string $passengerName,
        public string $passengerPhone,
        public string $pickupAddress,
        public string $dropoffAddress,
        public BookingChannel $createdByChannel,
        public ?int $userId = null,
        public ?string $openid = null,
        public ?string $notes = null,
        public ?float $pickupLat = null,
        public ?float $pickupLng = null,
        public ?float $dropoffLat = null,
        public ?float $dropoffLng = null,
        public ?int $returnEvRouteId = null,
        public ?int $returnDepartureTimeSlotId = null,
        public ?string $returnTravelDate = null,
        public ?array $returnSelections = null,
    ) {}
}
