import { FormulaEngine } from '../formula/formula-engine';
import type VTableSheet from '../components/vtable-sheet';
import type { FormulaCell, FormulaResult, IFormulaManager } from '../ts-types/formula';
import { FormulaRangeSelector } from '../formula/formula-range-selector';
import type { CellRange } from '../ts-types';
import { CellHighlightManager } from '../formula';
import type * as VTable from '@visactor/vtable';
export declare class FormulaManager implements IFormulaManager {
    sheet: VTableSheet;
    formulaEngine: FormulaEngine;
    private sheetMapping;
    private reverseSheetMapping;
    private isInitialized;
    private nextSheetId;
    cellHighlightManager: CellHighlightManager;
    _formulaWorkingOnCell: FormulaCell | null;
    lastKnownCursorPosInFormulaInput: number | null;
    formulaRangeSelector: FormulaRangeSelector;
    lastSelectionRangesOfHandling: CellRange[];
    inputIsParamMode: {
        inParamMode: boolean;
        functionParamPosition: {
            start: number;
            end: number;
        } | null;
    } | null;
    inputingElement: HTMLInputElement | null;
    get formulaWorkingOnCell(): FormulaCell | null;
    set formulaWorkingOnCell(value: FormulaCell | null);
    constructor(sheet: VTableSheet);
    private initializeFormulaEngine;
    addSheet(sheetKey: string, normalizedData?: unknown[][]): number;
    normalizeSheetData(data: unknown[][], tableInstance: VTable.ListTable): unknown[][];
    removeSheet(sheetKey: string): void;
    renameSheet(oldKey: string, newKey: string): void;
    getSheetId(sheetKey: string): number;
    setCellContent(cell: FormulaCell, value: unknown): void;
    getCellValue(cell: FormulaCell): FormulaResult;
    getCellFormula(cell: FormulaCell): string | undefined;
    isCellFormula(cell: FormulaCell): boolean;
    getCellDependents(cell: FormulaCell): FormulaCell[];
    getCellPrecedents(cell: FormulaCell): FormulaCell[];
    batchUpdate(changes: Array<{
        cell: FormulaCell;
        value: unknown;
    }>): void;
    addRows(sheetKey: string, rowIndex: number, numberOfRows?: number): void;
    removeRows(sheetKey: string, rowIndex: number, numberOfRows?: number): void;
    addColumns(sheetKey: string, columnIndex: number, numberOfColumns?: number): void;
    removeColumns(sheetKey: string, columnIndex: number, numberOfColumns?: number): void;
    changeColumnHeaderPosition(sheetKey: string, sourceCol: number, targetCol: number): void;
    changeRowHeaderPosition(sheetKey: string, sourceRow: number, targetRow: number): void;
    getSheetSerialized(sheetKey: string): unknown[][];
    sortFormulasByDependency(sheetKey: string, formulas: Record<string, string>): [string, string][];
    hasCircularReference(): boolean;
    getAvailableFunctions(): string[];
    validateFormula(formula: string): {
        isValid: boolean;
        error?: string;
    };
    isFormulaComplete(formula: string): boolean;
    calculateFormula(formula: string): {
        value: unknown;
        error?: string;
    };
    suspendEvaluation(): void;
    resumeEvaluation(): void;
    rebuildAndRecalculate(): void;
    clearContent(): void;
    release(): void;
    exportState(): Record<string, unknown>;
    exportFormulas(sheetKey: string): Record<string, string>;
    private ensureInitialized;
    getAllSheets(): Array<{
        key: string;
        id: number;
        name: string;
    }>;
    setActiveSheet(sheetKey: string): void;
    getActiveSheet(): string | null;
    copyRange(sourceSheet: string, sourceRange: {
        startRow: number;
        startCol: number;
        endRow: number;
        endCol: number;
    }, targetSheet: string, targetRow: number, targetCol: number): void;
}
