import type { IsoPrice } from '../../domain.objects/IsoPrice'; import type { IsoPriceShape } from '../../domain.objects/IsoPriceShape'; import type { IsoPriceWords } from '../../domain.objects/IsoPriceWords'; /** * .what = remainder distribution mode * .why = determines where leftover cents go in allocation */ type AllocationRemainderMode = 'first' | 'last' | 'largest' | 'random'; /** * .what = allocates a price into equal parts or by ratios * .why = enables fair distribution without loss (sum always equals original) * * @example * allocatePrice({ of: 'USD 10.00', into: { parts: 3 }, remainder: 'first' }) * // => ['USD 3.34', 'USD 3.33', 'USD 3.33'] * * @example * allocatePrice({ of: 'USD 5.00', into: { ratios: [7, 3] }, remainder: 'first' }) * // => ['USD 3.50', 'USD 1.50'] */ export declare function allocatePrice(input: { of: IsoPrice | string; into: { parts: number; } | { ratios: number[]; }; remainder: AllocationRemainderMode; }, options?: { format?: 'words'; }): IsoPriceWords[]; export declare function allocatePrice(input: { of: IsoPrice | string; into: { parts: number; } | { ratios: number[]; }; remainder: AllocationRemainderMode; }, options: { format: 'shape'; }): IsoPriceShape[]; /** * .what = alias for allocatePrice * .why = provides price-prefixed variant */ export declare const priceAllocate: typeof allocatePrice; export {};