//#region src/types.d.ts
interface PriceSnapshot {
  amount: bigint;
  currency: string;
  priceMode: 'inclusive' | 'exclusive';
}
interface CartLine {
  lineId: string;
  variantId: string;
  qty: number;
  price: PriceSnapshot;
  vendorId: string | null;
}
interface Cart {
  id: string;
  currency: string;
  lines: CartLine[];
  subtotal: bigint;
}
type CartAction = {
  type: 'addLine';
  variantId: string;
  qty: number;
  price: PriceSnapshot;
  vendorId?: string | null;
} | {
  type: 'setQty';
  lineId: string;
  qty: number;
} | {
  type: 'removeLine';
  lineId: string;
} | {
  type: 'clear';
};
//#endregion
//#region src/store.d.ts
interface CartStore {
  load(cartId: string): Promise<Cart | null>;
  save(cart: Cart): Promise<void>;
  merge(guestCartId: string, userId: string): Promise<Cart>;
}
//#endregion
export { PriceSnapshot as a, CartLine as i, Cart as n, CartAction as r, CartStore as t };