///
import { OrderRO, ShippingRO, TotalRO, ItemQtyRO, PriceRO, ItemsRO, CartItemRO, CartRO } from '../readonlyInterfaces';
import { addPrices, minusPrice, takeItems } from './basics';
import { documents } from './documents';
import { invariants } from './invariants';
export declare const order: {
shipping: (is: ReturnType) => >(order: T) => {
invoice: (invoice: U) => {
qty: number;
total: number;
};
cancel: (cancelation: U) => {
qty: number;
total: number;
};
refund: (refund: U) => {
qty: number;
total: number;
};
};
itemsQty: (iiq: ReturnType) => , T_1 extends OrderRO>(order: T_1) => {
invoice: (invoice: U_1) => V[];
cancel: (cancelation: U_1) => V[];
refund: (refund: U_1) => V[];
};
sales: {
shipping: (injectable: {
mp: ReturnType;
ap: ReturnType;
}) => >({ shipping, invoiced, refunded, canceled }: T_2) => {
ci: number;
cr: number;
ir: number;
};
total: (injectable: {
mp: ReturnType;
ap: ReturnType;
}) => >({ total, invoiced, refunded, canceled }: T_3) => {
ci: number;
cr: number;
ir: number;
};
items: (dim: ReturnType) => , T_4 extends OrderRO>(order: T_4) => {
ci: V_1[];
cr: V_1[];
ir: V_1[];
};
};
total: (injectable: {
mp: ReturnType;
ap: ReturnType;
ti: ReturnType;
dim: ReturnType;
iiq: ReturnType;
it: ReturnType;
dt: ReturnType;
dit: ReturnType;
}) => , T_5 extends OrderRO>(order: T_5) => {
invoice: >(invoice: D) => D & {
shipping: number;
items: I[];
total: & ShippingRO & TotalRO>(cart: V_2) => D & {
total: number;
shipping: number;
items: U_3[];
};
};
cancel: >(cancel: D_1) => D_1 & {
shipping: number;
items: I[];
total: & ShippingRO & TotalRO>(cart: V_3) => D_1 & {
shipping: number;
items: U_4[];
total: number;
};
};
refund: >(refund: D_2) => D_2 & {
shipping: number;
items: I[];
total: & ShippingRO & TotalRO>(cart: V_4) => D_2 & {
shipping: number;
items: U_5[];
total: number;
};
};
};
};