export type WidgetStyle = { [breakpoint: string]: Record; }; export enum WidgetDataSourceType { COLLECTION = 'collection', API = 'api', STATIC = 'static' } export interface WidgetDataSource { type: WidgetDataSourceType; id: string; widgetSlug?: string; details: { collection?: { pk: number; productLimit: number; }; api?: { url: string; method: string; headers: Record; body: Record; }; static?: { name: string; data: Record; }; }; } export type ImageSrc = { [key: string]: { src: string; dimensions: { width: number; height: number }; }; }; export type WidgetComponentData = { id: string; widgetSlug: string; type: string; tag: string; style: WidgetStyle; value: { text?: string; src?: string; alt?: string; title?: string; url?: string; type?: string; width?: string; height?: string; autoplay?: boolean; controls?: boolean; muted?: boolean; loop?: boolean; [key: string]: any; }; parentId: string | null; iteratingNode: string; iteratorValue: string; iteratingValue: string; selectedDataSourceId: string; dataSources: WidgetDataSource[]; imageSrc?: ImageSrc; href?: string; target?: string; slider?: { items?: number; slidesToSlide?: number; autoPlay?: boolean; autoPlaySpeed?: number; infinite?: boolean; showDots?: boolean; arrows?: boolean; itemsToShow?: number; }; };