import type { Context } from "hono"; import type { CatalogComponentAdapter } from "./catalog-component.js"; import type { TripCheckoutDeps } from "./checkout/types.js"; import type { FlightComponentAdapterApi } from "./flight-component.js"; import type { TripsRoutesOptionsProvider } from "./routes.js"; import type { CancelTripComponentsDeps, StartCheckoutDeps } from "./service.js"; import type { ComponentCheckoutResult } from "./service-types.js"; export interface TripsRouteRuntimeHost { createCatalogAdapter(c: Context): CatalogComponentAdapter; createFlightAdapter(c: Context): FlightComponentAdapterApi; createCheckoutDeps(c: Context): TripCheckoutDeps; } export interface TripsRouteRuntime { createRoutesOptions: TripsRoutesOptionsProvider; createStartCheckoutDeps(c: Context): StartCheckoutDeps; createCancelDeps(c: Context): CancelTripComponentsDeps; } /** Trips-owned lifecycle composition with only request-scoped host adapters injected. */ export declare function createTripsRouteRuntime(host: TripsRouteRuntimeHost): TripsRouteRuntime; export type CatalogCheckoutResult = { kind: "card_redirect"; bookingId: string; paymentSessionId: string; redirectUrl: string | null; } | { kind: "bank_transfer_instructions"; bookingId: string; paymentSessionId?: string | null; instructions: NonNullable; } | { kind: "inquiry_received"; bookingId: string; inquiryId: string; } | { kind: "hold_placed"; bookingId: string; }; /** Map Commerce checkout outcomes to the Trips component contract. */ export declare function catalogCheckoutResultToComponentResult(result: CatalogCheckoutResult): ComponentCheckoutResult;