import { ImageType } from './misc'; import { Product } from './product'; export type WidgetType = { kwargs?: { data_type?: 'nested'; value?: { image?: ImageType; mobile_image?: ImageType; }; }; value?: { alt?: string; image?: string; mobile_image?: string; url?: string; item_slug?: string; title?: string; }; }; export type WidgetResultType = { attributes?: T; products?: Array; name?: string; slug?: string; template?: string; }; export type WidgetSchemaType = { pk?: number; name?: string; schema?: T; }; export type DynamicWidgetResultType = WidgetResultType<{ [key: string]: { value: string; kwargs: { data_type: string; value?: string; url?: string; }; }; }>; export type DynamicWidgetSchemaType = WidgetSchemaType<{ [key: string]: { key: string; data_type: string; label: string; properties: { parent_id?: string; style?: { [key: string]: any; }; tag?: string; type?: string; }; }; }>;