export type QuantityBreak = { min: number; discount: number; }; /** The fractional discount (0–1) that applies at a given quantity. */ export declare const quantityDiscount: (breaks: QuantityBreak[], quantity: number) => number; /** The next break a buyer hasn't reached yet (for "order N+ to save X%" hints). */ export declare const nextQuantityBreak: (breaks: QuantityBreak[], quantity: number) => QuantityBreak | null; /** * Sanitize admin-entered breaks: numeric, min ≥ 1, discount clamped to * [0, 0.9], deduped by min (last wins), sorted ascending — the shape * quantityDiscount's reduce depends on. Always includes a min-1 base row. */ export declare const normalizeQuantityBreaks: (raw: unknown) => QuantityBreak[]; export type TierRow = { min: number; discount: number; /** Discounted unit price for a given base unit price. */ unitPrice: number; /** Per-piece savings vs the single-piece price. */ savings: number; }; /** Price-table rows ("12+ → $25.20 each, save 10%") for a base unit price. */ export declare const tierRows: (breaks: QuantityBreak[], baseUnitPrice: number) => TierRow[];