import { WidgetContainerStyleOptions } from '../../../../../types'; import { WidgetHeaderConfig } from '../types.js'; /** * Params for {@link useWidgetHeaderInfoButton}. */ export interface UseWidgetHeaderInfoButtonParams { /** Name of the widget's dataset, shown as the popover's heading. */ dataSetName?: string; /** The widget's description, shown in the popover. */ description?: string; /** Style options for the widget header. */ styleOptions?: WidgetContainerStyleOptions['header']; /** Re-runs the widget's query. */ onRefresh?: () => void; } /** * Adds the info button to a widget's header: a popover describing the widget's dataset, its * description and any errors or warnings, plus a refresh. * * Only widgets backed by a query call this. A filter control or a text widget has nothing to * describe and nothing to refresh, so it never creates the button in the first place — there is no * "disable the info button" switch to get wrong. * * @param headerConfig - The widget's header config so far. * @param params - Dataset name, description, header style options and the refresh callback. * @returns The header config carrying the info button. * @internal */ export declare const useWidgetHeaderInfoButton: (headerConfig: WidgetHeaderConfig | undefined, { dataSetName, description, styleOptions, onRefresh }: UseWidgetHeaderInfoButtonParams) => WidgetHeaderConfig;