/** * Local draft-state reducers + initialization helpers. * * The journey holds the draft as a single useState at the root and * passes immutable views down to step components, which call the * supplied setter to apply patches. Per * booking-journey-architecture ยง4. */ import type { BookingDraftV1 } from "@voyant-travel/catalog-contracts/booking-engine/contracts"; export type Draft = BookingDraftV1; export interface DraftEntityIdentity { module: string; id: string; /** * Source kind. Empty string on the storefront before the engine's * server-side resolver fills it in; operator-side wiring sets * the real kind upfront. */ sourceKind: string; sourceConnectionId?: string; sourceRef?: string; } export declare function emptyDraft(entity: DraftEntityIdentity, defaults?: { buyerType?: "B2C" | "B2B"; }): Draft; export declare function patchConfigure(draft: Draft, patch: Partial): Draft; export declare function patchBilling(draft: Draft, patch: Partial): Draft; export declare function setBillingBuyerType(draft: Draft, buyerType: "B2C" | "B2B"): Draft; export declare function canCopyBillingContactToTraveler(contact: Draft["billing"]["contact"]): boolean; export declare function patchPaxCount(draft: Draft, band: string, count: number): Draft; export declare function setTravelers(draft: Draft, travelers: Draft["travelers"]): Draft; export declare function setAccommodation(draft: Draft, accommodation: Draft["accommodation"]): Draft; export declare function setAddons(draft: Draft, addons: Draft["addons"]): Draft; export declare function setPayment(draft: Draft, payment: Draft["payment"]): Draft; export declare function totalPax(draft: Draft): number;