import { IkasCustomerReviewSettings, IkasCustomerSettings, IkasIndexPageSeoSetting, IkasLoyaltyProgram, IkasMerchantSettings, IkasProductBackInStockSettings, IkasSalesChannelPaymentGateway, IkasStorefontMetaTemplates, IkasStorefrontB2BSettings, IkasStorefrontPopup, IkasStorefrontRouting, IkasStorefrontType, IkasThemeStockPreference } from "../../storefront-models/src"; import { ThemeGlobals } from "./theme-globals"; export * from "./request-scope"; export * from "./theme-globals"; export declare class IkasStorefrontConfig { static themeId?: string; static apiUrl?: string; static cdnUrl?: string; static videoCdnUrl?: string; static baseUrl?: string; static apiKey?: string; static customerToken?: string; static storefrontId?: string; static storefrontRoutingId?: string; static storefrontType?: IkasStorefrontType; static storefrontB2BSettings?: IkasStorefrontB2BSettings; static priceListId?: string; static stockLocationIds?: string[]; static loginRequiredCallback?: LoginRequiredCallbackType; static domain?: string; static storefrontThemeId?: string; static salesChannelId?: string; static routings: IkasStorefrontRouting[]; static paymentGateways: IkasSalesChannelPaymentGateway[]; static gtmId?: string; static fbpId?: string; static analytics4Id?: string; static universalAnalyticsId?: string; static pickUpStockLocationIds?: string[] | null; static tiktokPixelId?: string; static openAiPixelId?: string; static stockPreference?: IkasThemeStockPreference; static translations: Record; static themeGlobals: ThemeGlobals; static storefrontJSScripts: string[]; static highPriorityStoreFrontJSScripts: string[]; static customerReviewSettings?: IkasCustomerReviewSettings | null; static productBackInStockSettings?: IkasProductBackInStockSettings | null; static merchantSettings?: IkasMerchantSettings | null; static currentPageComponents?: Record; static isEditor: boolean; static customerSettings?: IkasCustomerSettings; static metaTemplates: IkasStorefontMetaTemplates[] | null; static custom?: Record | null; static indexPageSeoSettings?: IkasIndexPageSeoSetting[] | null; static storefrontPopups: IkasStorefrontPopup[]; static loyaltyPrograms: IkasLoyaltyProgram[]; static payWithIkasUrl?: string | null; static sessionId?: string; static visitorId?: string; static journeyId?: string; static observers: IkasStorefrontConfigObserver[]; static isPreview: boolean; static addObserver(observer: IkasStorefrontConfigObserver): void; static init(config: Partial): void; static getCurrentRouting(): IkasStorefrontRouting | undefined; static getCurrentPath(): string; static getSupportedPaths(): string[]; static getCurrentLocale(): string; static getDefaultLocale(): string; static getIsPreview(): boolean; private static notify; static isCustomerReviewEnabled(): boolean; static isCustomerReviewLoginRequired(): boolean; static isBackInStockEnabled(): boolean; static isCustomerLoginRequiredForBackInStock(): boolean | null | undefined; static toJSON(): any; static isB2BStorefront(): boolean; static getDefaultCurrencyCode(): string | null | undefined; static getDefaultCurrencySymbol(): string | null | undefined; static isCaptchaRequired(): boolean; static getPayWithIkasUrl(): string | null | undefined; } export type IkasStorefrontConfigObserver = { id: string; callback: (config: IkasStorefrontConfig) => void; }; export type LoginRequiredCallbackType = () => Promise | void; export type IkasStorefrontConfigParams = { themeId?: string; apiUrl?: string; cdnUrl?: string; videoCdnUrl?: string; baseUrl?: string; apiKey?: string; token?: string; customerToken?: string; storefrontId?: string; storefrontRoutingId?: string; storefrontType?: IkasStorefrontType; storefrontB2BSettings?: IkasStorefrontB2BSettings; priceListId?: string; stockLocationIds?: string[]; loginRequiredCallback?: LoginRequiredCallbackType; domain?: string; storefrontThemeId?: string; salesChannelId?: string; routings: IkasStorefrontRouting[]; paymentGateways: IkasSalesChannelPaymentGateway[]; gtmId?: string; fbpId?: string; analytics4Id?: string; universalAnalyticsId?: string; pickUpStockLocationIds?: string[] | null; tiktokPixelId?: string; openAiPixelId?: string; stockPreference?: IkasThemeStockPreference; translations: Record; themeGlobals: ThemeGlobals; storefrontJSScripts: string[]; highPriorityStoreFrontJSScripts: string[]; customerReviewSettings?: IkasCustomerReviewSettings | null; productBackInStockSettings?: IkasProductBackInStockSettings | null; merchantSettings?: IkasMerchantSettings | null; currentPageComponents?: Record; isEditor: boolean; customerSettings?: IkasCustomerSettings; sessionId?: string; visitorId?: string; journeyId?: string; metaTemplates: IkasStorefontMetaTemplates[] | null; custom?: Record | null; indexPageSeoSettings?: IkasIndexPageSeoSetting[] | null; storefrontPopups: IkasStorefrontPopup[]; loyaltyPrograms: IkasLoyaltyProgram[]; payWithIkasUrl?: string | null; isPreview: boolean; }; type RoutingLike = { id: string; path?: string | null; }; /** The source routing: the first one without a path. Its language is the theme's base language. */ export declare function getSourceRouting(routings: T[]): T | undefined; /** The `sfRoutingId` a routing's theme values are stored under: the source routing uses the base values. */ export declare function getSfRoutingId(routing: RoutingLike | undefined): string | undefined; /** `translations` with the keys it lacks or leaves empty taken from `fallback` (the base language's). */ export declare function withFallbackTranslations(translations: Record | undefined, fallback: Record | undefined): Record; type I18nTree = { [key: string]: string | I18nTree; }; type I18nOwner = { projectId: string; i18n?: I18nTree | null; translations?: Array<{ locale: string; i18n?: I18nTree | null; }> | null; }; /** * The code component projects' UI texts in `locale`, for `I18n` under `cc.`: the language's, the base * texts (the project's `default.json`) for those it lacks. A project's generated `t()` reads them. */ export declare function codeComponentI18n(projects: I18nOwner[] | undefined | null, locale?: string): Record; /** * Takes any string, escapes it for JSON, and also makes sure * is escaped as <\/script>. Designed to work with nested JSON.stringify. */ export declare function escapeForJSON(str: string): string; /** * Inverse of escapeForJSON, which reconstitutes the original string. */ export declare function unescapeFromJSON(str: string): string;