import { BuyerRef, Order as Order$1, OrdersSchema as OrdersSchema$1, ProductKind } from "@platform-modules/commerce-orders";
import { ChargeResult, IntentStore as IntentStore$1, PaymentProvider as PaymentProvider$1, SettleChargeDeps } from "@platform-modules/billing";
import { FulfillmentPorts } from "@platform-modules/commerce-fulfillment";
import { Cart as Cart$1, CartLine, PriceSnapshot } from "@platform-modules/commerce-cart";
import { Transaction, TransactionalDatabase } from "@platform-modules/db";
//#region src/types.d.ts
type CheckoutInput = {
  cartId?: string;
  cart?: Cart$1;
  buyerRef: {
    userId: string;
  };
  priceMode: 'inclusive' | 'exclusive';
  currency: string;
  buyerCountry: string;
  idempotencyKey: string;
};
type CheckoutDeps<S extends OrdersSchema$1 = OrdersSchema$1> = Omit<SettleChargeDeps<S>, 'db'> & {
  db: TransactionalDatabase<S>;
  fulfillment: FulfillmentPorts;
  onSettle?: (tx: Transaction<S>, order: Order$1) => Promise<void>;
};
type PricedLine = {
  variantId: string;
  qty: number;
  unitNet: bigint;
  vat: bigint;
  lineTotal: bigint;
};
type StaleSplit = {
  removed: string[];
  updated: {
    variantId: string;
    was: bigint;
    now: bigint;
  }[];
};
type CatalogEntry = {
  available: boolean;
  price: PriceSnapshot;
  kind: ProductKind;
  title?: string;
  /** Catalog product's vendorId — the authoritative source for money attribution (cart lines are client-shaped). */
  vendorId?: string | null;
};
/** Checkout-local catalog view — assembled in startCheckout from commerce-catalog reads. */
type CatalogSnapshot = ReadonlyMap<string, CatalogEntry>;
//#endregion
export { CatalogSnapshot as a, CheckoutInput as c, OrdersSchema$1 as d, PaymentProvider$1 as f, StaleSplit as h, CatalogEntry as i, IntentStore$1 as l, PricedLine as m, Cart$1 as n, ChargeResult as o, PriceSnapshot as p, CartLine as r, CheckoutDeps as s, BuyerRef as t, Order$1 as u };