import * as lodash from 'lodash';
import { B as BeamCartAPIConfig, a as BeamCartValues } from './update-cart-l86bU5uS.esm.js';
import { T as TCart } from './cart-contents-CMm57qu0.esm.js';
import '../components/post-purchase.js';
import { p as postTransaction } from './routes-iurI6dvR.esm.js';
import { T as TUrl, L as LANGUAGES } from './types-aju0qrRe.esm.js';

type BeamShopifyCartIntegrationConfig = BeamCartAPIConfig & {
    storeId: number;
    chainId?: number;
};
/**
 * @main registerCartIntegration - set up event listeners to integrate Beam with Shopify cart
 * @return {boolean} returns true if NEW listeners were created, false if setup was already done
 */
declare function registerCartIntegration(config: BeamShopifyCartIntegrationConfig): Promise<boolean>;
/**
 * Adds Statsig data to a Shopify cart
 */
declare function appendStatsigToShopifyCartAttributes(config: BeamShopifyCartIntegrationConfig): Promise<void>;
/**
 * Detects change in cart since last page load,
 * by calling GET /cart.js, and returns cart values.
 * Used for:
 *  - Form-based carts where the page refreshes to modify cart instead of using AJAX calls
 *  - Hydrogen/GraphQL based carts (needs to be integrated manually)
 */
declare function getCurrentCart(config: BeamShopifyCartIntegrationConfig): Promise<{
    changed: boolean;
    cart: {
        cartId: string;
        subtotal: number;
        itemCount: number;
        currencyCode: string;
    } & TCart;
}>;
/**
 * trackCart - Backwards-compatible alias for updateCart
 */
declare const trackCart: lodash.DebouncedFuncLeading<(config: BeamCartAPIConfig, cartValues: BeamCartValues, isFirstCartUpdateOnPageLoad?: any) => Promise<void>>;
/**
 * Helper function to get the Shopify cart attributes
 */
declare const getShopifyCart: () => Promise<any>;
/**
 * Sends Beam data to Shopify to integrate with order as custom attributes.
 * Memoized so that calls with the same data as the previous don't create additional API calls to Shopify.
 * This will do an append, not a full overwrite of the attributes in the beam property
 */
declare const appendBeamAttributesToCart: (args_0: {
    selectedNonprofitId?: number | null | undefined;
    selectionId?: string | undefined;
    beamCartId?: string | undefined;
    cartId?: string | undefined;
    chainId?: number | undefined;
    storeId?: number | undefined;
    showBeam?: boolean | undefined;
    remoteSessionId?: string | undefined;
}) => Promise<void>;
/**
 * Sends Beam data to Shopify to integrate with order as custom attributes.
 * Memoized so that calls with the same data as the previous don't create additional API calls to Shopify.
 * This method force-updates the "beam" attribute with the values passed in
 */
declare const addBeamAttributesToCart: (args_0: {
    selectedNonprofitId?: number | null | undefined;
    selectionId?: string | undefined;
    beamCartId?: string | undefined;
    cartId?: string | undefined;
    chainId?: number | undefined;
    storeId?: number | undefined;
}) => Promise<void>;
declare global {
    interface Window {
        statsig?: any;
    }
}

type TBeamOrderPageParams = Parameters<typeof postTransaction>[0]["requestBody"] & {
    storeId?: number;
    postalCode?: string;
    countryCode?: string;
    orderId: string;
    email: string;
    cartTotal: number;
    cart: TCart;
    discountCodes: string[];
    currencyCode: string;
    parentSelector: string;
    apiKey: string;
    baseUrl: TUrl;
    domain?: string;
    lang: LANGUAGES;
    debug: boolean;
};
declare function showBeamOrderPageWidgets({ parentSelector, apiKey, baseUrl, storeId, postalCode, countryCode, orderId, email, cartTotal, cart, discountCodes, currencyCode, domain, lang, debug, }: TBeamOrderPageParams): Promise<void>;

export { type BeamShopifyCartIntegrationConfig as B, type TBeamOrderPageParams as T, addBeamAttributesToCart as a, appendStatsigToShopifyCartAttributes as b, appendBeamAttributesToCart as c, getShopifyCart as d, getCurrentCart as g, registerCartIntegration as r, showBeamOrderPageWidgets as s, trackCart as t };
