import { type BookingDraftShapeV1, type BookingDraftV1, type PaxBandCode } from "@voyant-travel/catalog-contracts/booking-engine/contracts"; import { type CatalogDetailEnrichment, type CatalogSlot } from "@voyant-travel/catalog-react"; import { type AvailabilitySlotRecord } from "@voyant-travel/operations-react/availability"; import * as React from "react"; import { type useBookingsUiMessagesOrDefault } from "../i18n/index.js"; import { type BookingCreateExtraLineInput } from "../index.js"; import { type ManualBookingSessionContinuation } from "../manual-booking-session-client.js"; import { type OptionUnitsStepperUnit } from "./option-units-stepper-section.js"; import { type PaymentScheduleValue } from "./payment-schedule-section.js"; import { type PersonPickerValue } from "./person-picker-section.js"; import type { PriceBreakdownValue } from "./price-breakdown-section.js"; import { type TravelerListValue, type TravelerPricingCategoryOption } from "./travelers-section.js"; export interface ManualBookingCreateFormProps { defaultProductId?: string; defaultSlotId?: string; onCreated: (bookingId: string) => void; onCancel: () => void; } export interface ManualBookingAttempt { fingerprint: string; /** * Cosmetic reference for the default shared-room group label only. The durable * booking reference is allocated by Booking Session Commit, so this is never * sent as the booking number. */ labelReference: string | null; idempotencyKey: string; continuation?: ManualBookingSessionContinuation; } export declare function formatManualBookingAmount(amountCents: number, currency: string, formatCurrency: (value: number, currency: string, options?: Omit) => string): string; export interface ManualBookingContactInput { contactPartyType: "individual" | "company"; contactTaxId: string | null; contactFirstName: string; contactLastName: string | null; contactEmail: string | null; contactPhone: string | null; contactPreferredLanguage: string | null; } export interface ManualBookingResolvedPricing { catalogAmountCents: number | null; confirmedAmountCents: number; priceOverrideReason: string | null; currency: string; } export declare function travelerRoleToPaxBand(role: string): PaxBandCode; export declare function manualBookingTravelerPaxBand(traveler: TravelerListValue["travelers"][number], pricingCategories?: ReadonlyArray): PaxBandCode; export declare function countManualBookingPaxBands(travelers: TravelerListValue["travelers"], pricingCategories?: ReadonlyArray): Record; export declare function manualBookingTravelersToRows(travelers: TravelerListValue["travelers"], pricingCategories?: ReadonlyArray): ({ clientTravelerKey: string | null; personId: string | null; firstName: string; lastName: string; email: string | null; phone: string | null; preferredLanguage: string | null; participantType: "traveler"; travelerCategory: "adult" | "child" | "infant" | null; isPrimary: boolean; roomUnitId: string | null; } | { travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | "student"; clientTravelerKey: string | null; personId: string | null; firstName: string; lastName: string; email: string | null; phone: string | null; preferredLanguage: string | null; participantType: "traveler"; isPrimary: boolean; roomUnitId: string | null; })[]; export declare function buildManualBookingQuoteDraft(input: { productId: string; sourceKind?: string; sourceConnectionId?: string; sourceRef?: string; optionId: string | null; slotId: string | null; quantities: Record; units: ReadonlyArray; travelers: TravelerListValue; pricingCategories?: ReadonlyArray; contact: ManualBookingContactInput | null; extraLines?: ReadonlyArray; promotionCode: string; paymentSchedule: PaymentScheduleValue; }): BookingDraftV1 | null; export declare function buildManualBookingSessionSelection(input: { quoteDraft: BookingDraftV1; booking: Record; catalogAmountCents: number | null; confirmedAmountCents: number; priceOverrideReason: string | null; }): Record; export declare function resolveManualBookingPricing(input: { pricing: PriceBreakdownValue | null; quoteTotalAmountCents: number | null; productAmountCents: number | null; currency: string; }): ManualBookingResolvedPricing | null; export declare function toManualBookingPriceOverride(pricing: ManualBookingResolvedPricing): { amountCents: number; reason: string; } | undefined; export declare function buildManualBookingContactInput(input: { billTo: "person" | "organization"; contact: { firstName: string; lastName: string; email: string; phone: string; preferredLanguage: string; taxId?: string | null; }; }): ManualBookingContactInput; export declare function validateManualBookingDraft(input: { productId: string; slotId?: string | null; requireDeparture?: boolean; hasSelectedUnits?: boolean; billing: PersonPickerValue; contactFirstName: string; contactLastName: string; contactEmail: string; contactPhone: string; travelers: TravelerListValue; pricing: ManualBookingResolvedPricing | null; manualOverrideRequiresReason?: boolean; paymentRows: Array<{ dueDate: string; amountCents: number; }>; paymentSchedule?: PaymentScheduleValue; messages: ReturnType["manualBookingCreate"]; }): string | null; export declare function ManualBookingCreateForm({ defaultProductId, defaultSlotId, onCreated, onCancel, }: ManualBookingCreateFormProps): React.JSX.Element; export interface SourcedProductOption { id: string; name: string; isDefault?: boolean; units?: ReadonlyArray<{ id: string; name: string; unitType?: string | null; minQuantity?: number | null; maxQuantity?: number | null; }>; } export declare function resolveSourcedProductOptions(shape: BookingDraftShapeV1 | undefined, content: CatalogDetailEnrichment | null): SourcedProductOption[]; export declare function resolveSourcedOptionUnits(options: ReadonlyArray, selectedOptionId: string | null, remainingPax: number | null): OptionUnitsStepperUnit[]; export declare function normalizeCatalogBookingSlot(slot: CatalogSlot, productId: string): AvailabilitySlotRecord | null;