import type { WidgetInfo, WidgetRepresentation } from './types'; export interface WidgetTaskHandlerProps { /** * Information about the widget being handled. */ widgetInfo: WidgetInfo; /** * What kind of action is being handled */ widgetAction: 'WIDGET_ADDED' | 'WIDGET_UPDATE' | 'WIDGET_RESIZED' | 'WIDGET_DELETED' | 'WIDGET_CLICK'; /** * Click action if widgetAction was WIDGET_CLICK */ clickAction?: string; /** * Additional click action data if widgetAction was `WIDGET_CLICK` */ clickActionData?: Record; /** * Function that needs to be called with the Widget JSX to render */ renderWidget: (widgetComponent: WidgetRepresentation) => void; } export type WidgetTaskHandler = (props: WidgetTaskHandlerProps) => Promise; /** * Register a task handler that will handle widget actions * * @param handler {@link WidgetTaskHandler} */ export declare function registerWidgetTaskHandler(handler: WidgetTaskHandler): void; //# sourceMappingURL=register-widget-task-handler.d.ts.map