import { a as PriceSnapshot, i as CartLine, n as Cart, r as CartAction, t as CartStore } from "./store-KdDmMjy4.js";
//#region src/apply.d.ts
declare function applyToCart(store: CartStore, cartId: string, action: CartAction): Promise<Cart>;
//#endregion
//#region src/errors.d.ts
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;
//#endregion
//#region src/reduce.d.ts
declare function cartReduce(state: Cart, action: CartAction): Cart;
declare function groupByVendor(cart: Cart): Array<{
  vendorId: string | null;
  lines: CartLine[];
  subtotal: bigint;
}>;
//#endregion
export { type Cart, type CartAction, type CartLine, type CartStore, CartValidationError, MixedCurrencyError, type PriceSnapshot, applyToCart, cartReduce, groupByVendor, isCartValidationError, isMixedCurrencyError };