import { C as CartStore, a as CartAction, b as Cart, c as CartLine } from './store-rnL7aNuU.js';
export { P as PriceSnapshot } from './store-rnL7aNuU.js';

declare function applyToCart(store: CartStore, cartId: string, action: CartAction): Promise<Cart>;

declare class CartValidationError extends Error {
    readonly field: string;
    readonly detail?: string | undefined;
    readonly name = "CartValidationError";
    readonly code: "CART_VALIDATION";
    constructor(field: string, detail?: string | undefined);
}
declare class MixedCurrencyError extends Error {
    readonly expected: string;
    readonly got: string;
    readonly name = "MixedCurrencyError";
    readonly code: "MIXED_CURRENCY";
    constructor(expected: string, got: string);
}
declare function isCartValidationError(e: unknown): e is CartValidationError;
declare function isMixedCurrencyError(e: unknown): e is MixedCurrencyError;

declare function cartReduce(state: Cart, action: CartAction): Cart;
declare function groupByVendor(cart: Cart): Array<{
    vendorId: string | null;
    lines: CartLine[];
    subtotal: bigint;
}>;

export { Cart, CartAction, CartLine, CartStore, CartValidationError, MixedCurrencyError, applyToCart, cartReduce, groupByVendor, isCartValidationError, isMixedCurrencyError };
