import { PriceFieldEnum } from '../types'; /** * Splits a given amount across a list of items, adjusting their total field values * to account for rounding differences. * * When {@link getCapacity} is supplied, it is a hard ceiling on **success**: no item is * raised above `getCapacity(item)`. Capacities bound upward corrections only; a downward * correction from at-or-below cap is never blocked. An item that already starts above its * cap cannot be made valid by rounding cents — throws `Failed to split rounding amount to * resources` and leaves `items` untouched, same as when no item can absorb the next cent * without breaching its cap. Callers must clamp {@link amount} to the summed capacity first. * Omit {@link getCapacity} for unbounded items; when supplied, it must return a non-negative price. * * @template T - The type of the items in the list. * @param {number} amount - The total amount to be split among the items. * @param {T[]} items - The list of items to split the amount across. * @param {string} [totalField=PriceFieldEnum.TOTAL_PRICE] - The field in each item that represents the total price. * @param {function} [getCapacity] - Optional per-item ceiling for the field being adjusted; omit for unbounded. Must return a non-negative price. */ export declare function splitRoundingAmount(amount: number, items: T[], totalField?: PriceFieldEnum, getCapacity?: (item: T) => number): void; /** * Splits a total amount into individual amounts specified by the given percent values. * @param {number} amount - The total amount to be split. * @param {number[]} percents - The list of percent values (must sum to 100). * @returns {number[]} The split amounts that correspond to the given percent values. */ export declare function splitAmountByPercents(amount: number, percents: number[]): number[];