import { SwishApp } from "../swish"; import { SwishUi } from "../swish-ui/swish-ui"; import type { Product, ProductVariant } from "../types"; import { Intent, IntentActivity, IntentQueryWithParams, IntentResponse, IntentToData } from "./types"; export interface IntentOptions { saveProduct: { promptVariantIfMissing: boolean | ((args: { product: Product; variant: ProductVariant | null | undefined; }) => boolean); promptVariantIfPresent: boolean; saveBeforeVariantPrompt: boolean; showFeedback: boolean; }; unsaveProduct: { selectList: boolean; confirm: boolean; showFeedback: boolean; }; editSavedProduct: { promptVariantChange: boolean; showFeedback: boolean; }; initiateQuickBuy: { promptVariantIfPresent: boolean; }; createCartLine: { afterComplete?: (response: IntentResponse<"create:cart-line">) => void; }; removeCartLine: { saveCartLine: boolean; }; saveCartLine: { confirm: boolean; showFeedback: boolean; afterComplete?: (response: IntentResponse<"save:cart-line">) => void; }; } export declare class Intents { private readonly swish; private readonly ui; private readonly eventBus; private readonly options; private readonly handlers; private _invoking; constructor(swish: SwishApp, ui: SwishUi); publishAnalyticsEvent(event: string, data: Record): void; invoke(intent: I, ...args: IntentToData extends void ? [] | [undefined] : [IntentToData]): Promise>>; listen(intent: I, callback: (response: IntentResponse) => void): () => void; parseIntentFromString(intentString: Intent | IntentQueryWithParams): { intent: Intent; data: Record; }; parseIntentFromUrl(url: URL): { intent: Intent; data: Record; } | null; private mapParamNames; private resolveIntentData; private invokeFromParsed; parseIntentFromHash(hash: string): Intent | null; handleIntent(intent: I, data: IntentToData): Promise>; initIntentHooks(): void; private initCartChangeListener; initIntentWatcher(): void; }