import type { TranslationOverrides } from "@swishapp/i18n"; import type { PlacementSpec } from "../dom/create-placement"; import type { IntentOptions } from "../intents/intents"; import { StorefrontApiOptions } from "../swish"; import { type DefaultView } from "./schemas"; import type { AuthOptions, DrawerSectionInput, FeaturesOptions, HomeSectionInput, ListDetailPageSectionInput, ListDetailSectionInput, ListsSectionInput, MetafieldOptions, NotificationsSectionInput, OrderDetailSectionInput, OrdersSectionInput, ProductDetailSectionInput, ProfileSectionInput, SavesSectionInput, StorefrontContext, SwishOptions, TransformOptions, UiDesignOptions } from "./types"; export type IntentOptionsInput = { [K in keyof IntentOptions]?: Partial; }; export declare const DEFAULT_INTENT_OPTIONS: IntentOptions; export declare const resolveIntentOptions: (input: IntentOptionsInput | null | undefined, base?: IntentOptions) => IntentOptions; export type SwishOptionsInput = { storefront: StorefrontApiOptions; context: StorefrontContext; translations?: TranslationOverrides; auth?: Partial; features?: Partial; metafields?: MetafieldOptions; transforms?: TransformOptions; intents?: IntentOptionsInput; placements?: PlacementSpec[]; ui?: Partial; customiser?: { baseUrl?: string; }; }; interface UiOptions { baseUrl?: string; css?: (string | URL)[]; design?: UiDesignOptions; icons?: Record; images?: { baseTint?: boolean; }; productCard?: { linkToProductPage?: boolean; showQuickBuyButton?: boolean; }; badges?: { rules?: BadgeRuleInput[]; }; toasts?: { autoHideDuration?: number; }; wishlist?: { experience?: "drawer" | "classic-page"; multipleLists?: boolean; }; cart?: { navigateOnInCart?: boolean; drawerTrigger?: string; }; defaultView?: DefaultView; drawer?: { sections?: DrawerSectionInput[]; }; home?: { sections?: HomeSectionInput[]; }; saves?: { sections?: SavesSectionInput[]; }; lists?: { sections?: ListsSectionInput[]; }; listDetail?: { sections?: ListDetailSectionInput[]; }; listDetailPage?: { sections?: ListDetailPageSectionInput[]; }; orders?: { sections?: OrdersSectionInput[]; }; orderDetail?: { sections?: OrderDetailSectionInput[]; }; productDetail?: { sections?: ProductDetailSectionInput[]; }; profile?: { sections?: ProfileSectionInput[]; }; notifications?: { sections?: NotificationsSectionInput[]; }; } type BadgeRowInputBase = { id?: string; enabled?: boolean; label?: string; backgroundColor?: string; textColor?: string; }; export type BadgeRuleInput = (BadgeRowInputBase & { type: "sold-out" | "sale"; }) | (BadgeRowInputBase & { type: "low-stock"; max?: number; }) | (BadgeRowInputBase & { type: "custom"; label: string; condition: { type: "tag"; tag: string; } | { type: "metafield"; metafield: `${string}.${string}`; operator?: "exists" | "equals" | "contains"; value?: string; } | { type: "discount"; minPercent?: number; }; }); export declare const createSwishOptions: (options: SwishOptionsInput) => SwishOptions; export {};