import { AgentInsightEdits, FetchStateAndError } from '@zeniai/client-epic-state'; export type AgentInsightSaveState = "idle" | "saving" | "failed"; export interface AgentInsightSaveStatus { hasUnpersistedEdits: boolean; isPending: boolean; } interface UseAgentInsightEditsArgs { /** The shared month-end save status. Shared with the plain Save Changes button. */ saveStatus: FetchStateAndError; /** Bumped when a regeneration starts; session edits are discarded on change. */ regenerationCount?: number; /** Persists the current edits. Called on every edit, serialized by this hook. */ save: () => void; /** Reports the state upward, for a parent that gates regeneration on it. */ onStateChange?: (state: AgentInsightSaveStatus) => void; } /** * The state behind editing AI CFO insights, shared by the two month-end surfaces * (the cockpit report page and the webapp's expense-automation section) so the * mirror screens cannot drift apart. */ export declare const useAgentInsightEdits: ({ saveStatus, save, regenerationCount, onStateChange, }: UseAgentInsightEditsArgs) => { agentInsightEdits: AgentInsightEdits; agentInsightEditsRef: import('react').MutableRefObject; hasUnpersistedAgentEdits: boolean; onAgentInsightEdit: (edits: AgentInsightEdits) => void; saveState: AgentInsightSaveState; }; export {};