import { DashboardModel } from '../../../../domains/dashboarding/dashboard-model'; import { UseDashboardModelAction, UseDashboardModelInternalAction } from './dashboard-model-reducer'; export interface UseDashboardPersistenceParams { /** * The dashboard model to manage persistence for */ dashboard: DashboardModel | null; /** * Boolean flag indicating whether changes to the dashboard state should be saved to the dashboard in Fusion * * @default true */ persist?: boolean; /** * Whether to load the dashboard in shared mode (co-authoring feature). * * @default false * @internal */ sharedMode?: boolean; } export interface UseDashboardPersistenceResult { /** * The current dashboard model with local state */ dashboard: DashboardModel | null; /** * Function to dispatch changes to the dashboard model with optional persistence. * Returns a promise that resolves to the processed (or transformed) action. */ dispatchChanges: (action: UseDashboardModelAction) => Promise; } /** * Hook that provides persistence capabilities for an already loaded dashboard model. * This hook manages local state changes and optionally persists them to the server. * * @param params - Parameters for dashboard persistence * @returns Dashboard persistence state and dispatch function * * @sisenseInternal */ export declare function useDashboardPersistence({ dashboard, persist, sharedMode, }: UseDashboardPersistenceParams): UseDashboardPersistenceResult;