import type { CartSyncClient } from "./client"; export interface ShopifyCartSyncHostProps { /** The app's client, from `configureCartSync` (with `signedInShopifyCustomer` for its session). */ client: CartSyncClient; /** * Tells the shopper their cart changed under them: "We found your saved cart and synced it." or * "That cart was already checked out. Started a fresh one." (`DEFAULT_MESSAGES`). A toast, usually. */ notify?: (message: string) => void; /** Sync each time the cart page comes into view (sdk-shopify's `cart:viewed`). Default true (0.7.0). */ syncOnCartView?: boolean; /** * Mark the cart checked out when sdk-shopify's checkout page sees its order placed * (`checkout:completed`, sdk-shopify 0.15). Default true (0.7.0): the app needs no * `useMarkCartCheckedOut` of its own. */ markCheckedOutOnOrder?: boolean; } /** * Keeps the phone's cart in step with the shopper's shared cart. Mount once, inside `ShopifyProvider` * (it reads `useCart`, `useCustomer` and `useShopify`). Renders nothing. * * It syncs once the stored cart, the session and the profile are all in (`cartSyncReady`), on * sign-in, when the cart id changes, when the app comes back to the foreground, each time the cart page * comes into view (sdk-shopify 0.14's `cart:viewed`; `syncOnCartView`), and on `requestCartSync()`. On sign-in it merges the phone's cart into the account's, or keeps the phone's * when the account's is empty (the README's "How a sync decides"). When sdk-shopify's checkout page * sees the order placed (`checkout:completed`), the cart is marked checked out (`markCheckedOutOnOrder`). */ export declare function ShopifyCartSyncHost({ client, notify, syncOnCartView, markCheckedOutOnOrder }: ShopifyCartSyncHostProps): null; /** * Marks the cart spent once its order is placed, so neither this phone nor the web store picks it * back up: recorded on the phone first, then on Apptile's side for the signed-in shopper. Call the * returned function from checkout, the only place that knows an order was placed (the app's own * signal: sdk-shopify's `isOrderPlacedUrl` in a checkout web view, say), before the cart resets. * Inside `ShopifyProvider`. */ export declare function useMarkCartCheckedOut(client: CartSyncClient): (cartId: string | null) => Promise; //# sourceMappingURL=shopifyHost.d.ts.map