import { CustomWidgetComponent, CustomWidgetComponentProps } from './types';
/**
* Hook that provides API for configuring custom widgets.
*
* @example
* Example of registering a custom widget in a dashboard:
* ```tsx
* import { useEffect } from 'react';
* import { useCustomWidgets, DashboardById } from '@sisense/sdk-ui';
* import CustomHistogramWidget from './custom-histogram-widget';
*
* const Example = () => {
* const { registerCustomWidget, unregisterCustomWidget } = useCustomWidgets();
*
* useEffect(() => {
* registerCustomWidget('histogramwidget', CustomHistogramWidget);
* // Optionally unregister on unmount (e.g. if the widget should only be available within this component)
* return () => unregisterCustomWidget('histogramwidget');
* }, [registerCustomWidget, unregisterCustomWidget]);
*
* return ;
* }
* ```
* @group Dashboards
*/
export declare const useCustomWidgets: () => UseCustomWidgetsResult;
/**
* Result of the `useCustomWidgets` hook.
*/
export type UseCustomWidgetsResult = {
/** Registers a custom widget. */
registerCustomWidget: (customWidgetType: string, customWidget: CustomWidgetComponent) => void;
/** Unregisters a legacy custom widget for the given type name. */
unregisterCustomWidget: (customWidgetType: string) => void;
/** Checks if a custom widget is registered. */
hasCustomWidget: (customWidgetType: string) => boolean;
/** Gets a custom widget. */
getCustomWidget: (customWidgetType: string) => CustomWidgetComponent | undefined;
};