/** * Convert between the `PaymentScheduleSection` editor value * (`{ mode, installments }`) and the booking draft's `paymentSchedules` rows. * * The row shape is derived from `Draft` so it always matches the engine * contract. Paid-installment metadata (date / method / reference) is encoded * as JSON in the row `notes` — the SAME format the owned create-sheet uses — * so a schedule round-trips losslessly through the draft (and both flows write * an identical wire shape). */ import { type PaymentScheduleValue } from "../../components/payment-schedule-section.js"; import type { Draft } from "./draft-state.js"; type PaymentScheduleRow = NonNullable[number]; /** Editor value → draft rows. Returns `[]` when nothing is schedulable yet. */ export declare function paymentScheduleValueToRows(value: PaymentScheduleValue, currency: string, totalAmountCents: number | null): PaymentScheduleRow[]; export declare function findPaidScheduleRowsMissingPaymentDate(rows: PaymentScheduleRow[] | undefined): number | null; /** Draft rows → editor value (re-init on step remount; preserves paid metadata). */ export declare function rowsToPaymentScheduleValue(rows: PaymentScheduleRow[] | undefined, departureDate: string | null): PaymentScheduleValue; export {};