import { WidgetsPanelLayout } from '../../../domains/dashboarding/dashboard-model'; /** * Props for the useEditModeToolbar hook * @internal */ export interface UseEditModeToolbarProps { /** * Initial layout to track history for */ initialLayout: WidgetsPanelLayout; /** * Optional callback when layout is applied */ onApply?: (layout: WidgetsPanelLayout) => void; /** * Optional callback when edit is canceled */ onCancel?: () => void; /** * Maximum number of history entries to store * @default 20 */ historyCapacity?: number; } /** * Return type for the useEditModeToolbar hook * @internal */ export interface UseEditModeToolbarResult { /** * Current layout state */ layout: WidgetsPanelLayout; /** * Function to update layout state and track in history */ setLayout: (layout: WidgetsPanelLayout | ((prev: WidgetsPanelLayout) => WidgetsPanelLayout)) => void; /** * Whether there are unsaved changes */ hasChanges: boolean; /** * Toolbar component with undo, redo, cancel, apply buttons */ toolbar: () => JSX.Element; } /** * Hook that provides layout state management with history tracking and a toolbar with undo/redo/cancel/apply buttons * * @param props Configuration options for the toolbar * @returns Layout state and toolbar component * @internal */ export declare function useEditModeWithHistory({ initialLayout, onApply, onCancel, historyCapacity, }: UseEditModeToolbarProps): UseEditModeToolbarResult;