/**
 * ShopifyPixelBridge — storefront-side identity ferry for the Web Pixel.
 *
 * The SDK can't run in Shopify's sandboxed checkout. This bridge writes the
 * telemetry context (distinct_id, telemetry host, public PostHog key) into
 * two places so the Web Pixel can read it from either context:
 *
 *   1. A `syntro_experiments` cookie on the storefront origin. The pixel
 *      reads this from `browser.cookie.get()` for storefront-side events
 *      (e.g., `product_added_to_cart`).
 *
 *   2. Cart attributes (`_syntro_distinct_id`, `_syntro_telemetry_host`,
 *      `_syntro_telemetry_key`) via `POST /cart/update.js` — Shopify's Cart
 *      Ajax API. The underscore prefix hides them from the customer at
 *      checkout. Cart attributes travel with the cart token through every
 *      page Shopify orchestrates, including Shop Pay, and arrive intact in
 *      `event.data.checkout.attributes` on `checkout_completed`.
 *
 * Why both: the Web Pixel sandbox is re-initialized on every page (storefront,
 * checkout, thank-you), and `browser.cookie.get()` proxies to the *current*
 * top frame. On `checkout_completed`, that top frame is the merchant's
 * checkout host or, under Shop Pay, `shop.app` — neither can see the
 * storefront-origin cookie. Cart attributes are the only durable channel.
 *
 * Experiment attribution is NOT carried in either channel. PostHog already
 * tracks each shopper's assignments server-side via `$experiment_started`
 * events fired from the storefront SDK under the same distinct_id. When the
 * pixel's checkout event lands with that distinct_id, PostHog auto-attributes
 * the conversion to the correct variant.
 *
 * Cookie max-age: 30 days. Cookie SameSite: Lax.
 */
export interface ShopifyPixelBridgeContext {
    /** PostHog distinct_id from the storefront telemetry client. */
    distinctId: string;
    /** Telemetry proxy host, e.g. `https://telemetry.syntrologie.com`. No trailing slash. */
    telemetryHost: string;
    /** Public write-only PostHog key. */
    telemetryKey: string;
}
export declare class ShopifyPixelBridge {
    private context;
    constructor(context: ShopifyPixelBridgeContext);
    /** Update the telemetry context (e.g., after consent is granted and
     *  PostHog finally initializes and a real distinct_id becomes available). */
    updateContext(context: ShopifyPixelBridgeContext): void;
    destroy(): void;
    private writeCookie;
    /**
     * Mirror identity into Shopify cart attributes. The Web Pixel reads these
     * from `event.data.checkout.attributes` on `checkout_completed`, which is
     * the only context that survives every checkout topology Shopify supports
     * (one-page checkout, Shop Pay, accelerated wallets).
     *
     * Best-effort: Cart Ajax API isn't available outside an online-store-2.0
     * storefront and may 404 in test harnesses or non-Shopify hosts. A failure
     * here must not break the storefront SDK's other work — the cookie path
     * still covers the storefront-side `product_added_to_cart` event.
     */
    private writeCartAttributes;
}
