import { WidgetType } from '@brainfish-ai/widgets-common'; import { type WidgetOpenOptions } from './WidgetGlobalAPI'; export interface IWidgetInstance { widgetKey: string; widgetType: WidgetType; isWidgetOpen: boolean; openWidget(options?: WidgetOpenOptions): void; closeWidget(): void; } /** * Manages the registry of all widget instances * Single responsibility: Track and retrieve widget instances */ export declare class WidgetRegistry { private static instances; static register(widgetKey: string, instance: IWidgetInstance): void; static getInstance(widgetKey: string): IWidgetInstance | undefined; static unregister(widgetKey: string): void; static getAllInstances(): IWidgetInstance[]; static getOpenInstance(): IWidgetInstance | undefined; static getClosedPopupInstance(): IWidgetInstance | undefined; static clear(): void; }