import type { DashboardPersistenceManager } from '../../../domains/dashboarding/persistence/types'; import type { WidgetProps } from '../../../domains/widgets/components/widget/types'; type Persistence = Pick | undefined; /** * Composition middleware that adds persistable widget-update plumbing to a * widget list. For each widget that exposes a known runtime-state callback * (currently only `styleOptions.navigator.onScrollerChange` for charts with * a navigator, and `styleOptions.columns.onColumnsResize` for table charts with * resizable columns), the hook injects a handler that: * * 1. Applies the update optimistically to local widget state (the parent * `useComposedDashboardInternal` re-renders with the new value). * 2. Schedules a debounced (500 ms) call to `persistence.updateWidget` with * a {@link WidgetPropsUpdate}-shaped payload. * * When `persistence` is `undefined`, the optimistic apply still runs (so * visualizations behave correctly in read-only mode) and the persist call * is skipped. * * Errors during persistence are logged via `console.error`; the hook does * not roll back local state. * * @sisenseInternal */ export declare function useWidgetUpdatesPersistence(widgets: WidgetProps[], setWidgets: (updater: (prev: WidgetProps[]) => WidgetProps[]) => void, persistence?: Persistence): { widgets: WidgetProps[]; }; export {};