import type { BookingDepositRefundPolicy } from './booking-flexible-balance';
export type BookingInstalmentIntervalUnit = 'day' | 'week' | 'month';
export type OrderInstalmentPlanStatus = 'pending_initial_payment' | 'active' | 'completed' | 'payment_failed' | 'cancelled' | 'cancelled_as_paid_early' | 'refunded' | 'reconciliation_required';
export type OrderInstalmentStatus = 'pending_initial_payment' | 'scheduled' | 'paid' | 'failed' | 'waived' | 'cancelled' | 'cancelled_as_paid_early' | 'refunded';
export type OrderInstalmentPhaseKind = 'initial' | 'scheduled';
export type OrderInstalmentSummaryRow = Readonly<{
    id: string;
    sequence: number;
    phaseKind: OrderInstalmentPhaseKind;
    dueAt: string;
    amountCents: number;
    status: OrderInstalmentStatus;
}>;
export type OrderInstalmentSummary = Readonly<{
    status: OrderInstalmentPlanStatus;
    remainingBalanceCents: number;
    nextDueAt: string | null;
    nextDueAmountCents: number | null;
    rows: readonly OrderInstalmentSummaryRow[];
}>;
export type BookingDepositBearingInstalmentPlanConfig = Readonly<{
    kind: 'deposit_plus_one_remainder';
    depositAmountCents: number;
    depositRefundability: BookingDepositRefundPolicy;
    remainderDueCount: number;
    intervalUnit: BookingInstalmentIntervalUnit;
}> | Readonly<{
    kind: 'deposit_plus_scheduled_instalments';
    depositAmountCents: number;
    depositRefundability: BookingDepositRefundPolicy;
    instalmentCount: number;
    intervalCount: number;
    intervalUnit: BookingInstalmentIntervalUnit;
}>;
export type BookingInstalmentPlanConfig = BookingDepositBearingInstalmentPlanConfig | Readonly<{
    kind: 'equal_scheduled_instalments';
    instalmentCount: number;
    intervalCount: number;
    intervalUnit: BookingInstalmentIntervalUnit;
}>;
export declare function isDepositBearingBookingInstalmentPlan(plan: BookingInstalmentPlanConfig): plan is BookingDepositBearingInstalmentPlanConfig;
export declare function getBookingInstalmentDepositRefundability(plan: BookingInstalmentPlanConfig): BookingDepositRefundPolicy | null;
export declare function getBookingInstalmentProtectedDepositAmountCents(plan: BookingInstalmentPlanConfig): number | null;
export declare function clampConfiguredAmount(amountCents: number, totalAmountCents: number): number;
export declare function splitAmountWithRemainderInFirst(totalAmountCents: number, partCount: number): readonly number[];
export declare function addIntervalPreservingMonthAnchor(isoString: string, intervalCount: number, intervalUnit: BookingInstalmentIntervalUnit): string;
export declare function getBookingInstalmentPlanIntervalCount(plan: BookingInstalmentPlanConfig): number;
export declare function omitZeroAmountFutureRows<Row extends Readonly<{
    amountCents: number;
}>>(rows: readonly Row[]): readonly Row[];
export declare function formatOrderInstalmentStatusLabel(input: Readonly<{
    phaseKind: OrderInstalmentPhaseKind;
    status: OrderInstalmentStatus;
}>): string;
export declare function buildOrderInstalmentSummary(input: Readonly<{
    paymentPlan: Readonly<{
        status: OrderInstalmentPlanStatus;
        remainingBalanceCents: number;
    }>;
    instalments: readonly OrderInstalmentSummaryRow[];
}>): OrderInstalmentSummary;
