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<FormulaCalculationResult>;
    getCrossSheetValue(cell: FormulaCell): Promise<FormulaCalculationResult>;
    updateCrossSheetReferences(targetSheet: string, changedCells: FormulaCell[]): Promise<void>;
    validateCrossSheetFormula(cell: FormulaCell): ValidationResult;
    validateAllCrossSheetFormulas(): Map<string, ValidationResult>;
    getCrossSheetDependencies(): Map<string, string[]>;
    recalculateAllCrossSheetFormulas(): Promise<void>;
    recalculateFormula(cell: FormulaCell): Promise<FormulaCalculationResult>;
    private hasCrossSheetReference;
    private cacheCalculationResult;
    private getCachedResult;
    private getCacheKey;
    private parseA1Notation;
    private getA1Notation;
    updateOptions(options: Partial<CrossSheetFormulaOptions>): 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<void>;
    destroy(): void;
}
