import type { DebugMode, ElementsEnv } from '@/enums'; import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from './configs'; export type DeepPartial = { [P in keyof T]?: T[P] extends object ? DeepPartial : T[P]; }; export interface IElementsProxyConfig { baseUrl: string; headers?: Record; } export interface ILiquidCommerceElementsDevelopmentConfig { customApiUrl?: string; openShadowDom?: boolean; mockMode?: boolean; } export interface IClientCustomThemeConfig { global?: UpdateComponentGlobalConfigs; product?: UpdateProductComponent; address?: UpdateAddressComponent; cart?: UpdateCartComponent; checkout?: UpdateCheckoutComponent; productList?: UpdateProductListComponent; } export interface ILiquidCommerceElementsCheckoutConfig { pageUrl?: string; } export interface ILiquidCommerceElementsBaseConfig { env?: ElementsEnv; promoTicker?: IPromoTicker[]; customTheme?: IClientCustomThemeConfig; debugMode?: DebugMode; checkout?: ILiquidCommerceElementsCheckoutConfig; proxy?: IElementsProxyConfig; development?: ILiquidCommerceElementsDevelopmentConfig; } export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig { } export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig { } export interface ILiquidCommerceElementsCheckoutClientConfig extends ILiquidCommerceElementsBaseConfig { }