import { type ChartTableToggleLabels } from './chart-table-toggle-button'; /** * Loose widget shape so Compose SDK `WidgetProps` unions assign without extra casts. * Table-view state is keyed by `id`, then `title`, then a hash of the widget query. * * @sisenseInternal */ export type ChartTableToggleWidget = { widgetType?: string; id?: string; title?: string; chartType?: string; dataOptions?: unknown; config?: object; }; /** * Options for {@link useWidgetsChartTableToggle}. * * @sisenseInternal */ export type UseWidgetsChartTableToggleOptions = { labels?: ChartTableToggleLabels; /** Primitive identity. Non-primitives are ignored so an inline object cannot loop. */ resetKey?: string | number | boolean | null; isWidgetDisabled?: (widget: T) => boolean; }; /** * Wires an in-memory chart↔table toggle onto dashboard chart widgets. * Keys table-view state by `id`, then `title`, then a hash of chart type + data options. * * @param widgets - Dashboard widgets * @param options - Labels, reset key, and per-widget disabled predicate * @returns Widgets with the toggle on eligible charts * @example * ```tsx * const widgets = useWidgetsChartTableToggle(dashboard.widgets, { resetKey: dashboard.oid }); * return ; * ``` * @group Widgets * @sisenseInternal */ export declare function useWidgetsChartTableToggle(widgets: readonly T[] | undefined, options?: UseWidgetsChartTableToggleOptions): T[];