import type { FormulaCell } from '../ts-types/formula'; import type { FormulaEngine } from './formula-engine'; import { type ValidationResult } from './cross-sheet-formula-validator'; export interface CrossSheetFormulaOptions { enableCaching: boolean; enableValidation: boolean; syncTimeout: number; maxRecursionDepth: number; } export interface FormulaCalculationResult { value: any; error?: string; dependencies: FormulaCell[]; calculationTime: number; } export declare class CrossSheetFormulaHandler { private formulaEngine; private crossSheetManager; private dataSynchronizer; private validator; private formulaManager?; private options; private isCalculating; private calculationQueue; private calculationResults; constructor(formulaEngine: FormulaEngine, sheetManager?: { getAllSheets: () => Array<{ sheetKey: string; sheetTitle: string; }>; }, formulaManager?: any); setCrossSheetFormula(cell: FormulaCell, formula: string): Promise; getCrossSheetValue(cell: FormulaCell): Promise; updateCrossSheetReferences(targetSheet: string, changedCells: FormulaCell[]): Promise; validateCrossSheetFormula(cell: FormulaCell): ValidationResult; validateAllCrossSheetFormulas(): Map; getCrossSheetDependencies(): Map; recalculateAllCrossSheetFormulas(): Promise; recalculateFormula(cell: FormulaCell): Promise; private hasCrossSheetReference; private cacheCalculationResult; private getCachedResult; private getCacheKey; private parseA1Notation; private getA1Notation; updateOptions(options: Partial): void; getHandlerStatus(): { isCalculating: boolean; pendingCalculations: number; cacheSize: number; options: CrossSheetFormulaOptions; }; clearCache(): void; addDataChangeListener(sheet: string, listener: (event: any) => void): void; removeDataChangeListener(sheet: string, listener: (event: any) => void): void; forceSync(): Promise; destroy(): void; }