import type { FormulaCell, FormulaResult } from '../ts-types/formula'; export interface FormulaEngineConfig { precisionRounding?: number; caseSensitive?: boolean; ignoreWhiteSpace?: 'standard' | 'any'; nullDate?: { year: number; month: number; day: number; }; dateFormats?: string[]; timeFormats?: string[]; } export declare class FormulaEngine { private sheets; private reverseSheets; private sheetTitles; private sheetData; private formulaCells; private dependencies; private dependents; private nextSheetId; private activeSheetKey; constructor(_config?: FormulaEngineConfig); setActiveSheet(sheetKey: string): void; getActiveSheet(): string | null; addSheet(sheetKey: string, data?: unknown[][]): number; setSheetTitle(sheetKey: string, sheetTitle: string): void; updateSheetData(sheetKey: string, data: unknown[][]): void; private normalizeData; getSheetId(sheetKey: string): number; getFormulaString(cell: FormulaCell): string | null; private clearDependencies; private setCellContentWithoutDependencyUpdate; setCellContent(cell: FormulaCell, value: unknown): void; private getCellKey; private getA1Notation; private parseA1Notation; private parseCellKey; calculateFormula(formula: string): { value: unknown; error?: string; }; private correctFormulaCase; private findOriginalSheetName; private parseExpression; private tryParseComparison; private parseArithmetic; private tryParseFunction; private parseArguments; private executeFunction; private calculateSum; private calculateAverage; private calculateMax; private calculateMin; private calculateAbs; private calculateFloor; private calculateCeiling; private calculateRound; private calculateSqrt; private calculatePower; private calculateMod; private calculateInt; private calculateRand; private calculateCount; private calculateCountA; private calculateStdev; private calculateVar; private calculateMedian; private calculateProduct; private calculateIf; private calculateAnd; private calculateOr; private calculateNot; private calculateToday; private calculateNow; private toDate; private calculateYear; private calculateMonth; private calculateDay; private calculateHour; private calculateMinute; private calculateSecond; private flattenArgs; private flattenArgsWithRanges; private isTruthy; private evaluateArithmeticWithFunctions; private toArithmeticNumber; private evaluateBasicArithmetic; private findInnermostFunctionCallSpan; private getCellValueByA1; private getRangeValuesFromExpr; getCellValue(cell: FormulaCell): FormulaResult; getCellFormula(cell: FormulaCell): string | undefined; isCellFormula(cell: FormulaCell): boolean; getCellDependents(cell: FormulaCell): FormulaCell[]; getCellPrecedents(cell: FormulaCell): FormulaCell[]; getAvailableFunctions(): string[]; validateFormula(formula: string): { isValid: boolean; error?: string; }; private validateFunctionNames; private validateExpressionStructure; release(): void; exportFormulas(sheetKey: string): Record; getSheetTitle(sheetKey: string): string | undefined; getAllSheets(): Array<{ key: string; id: number; title: string; }>; sortFormulasByDependency(sheetKey: string, formulas: Record): [string, string][]; removeSheet(sheetKey: string): void; renameSheet(oldKey: string, newKey: string): void; private areSetsEqual; private updateDependencies; private extractCellReferences; private extractReferencesFromExpression; private expandRangeToCells; private recalculateDependents; private recalculateDependentsWithTracking; private recalculateSingleCellWithTracking; private sortCellsByDependency; adjustFormulaReferences(sheetKey: string, type: 'insert' | 'delete', dimension: 'row' | 'column', index: number, count: number, totalColCount: number, totalRowCount: number): { adjustedCells: FormulaCell[]; movedCells: FormulaCell[]; }; private adjustFormulaReference; private columnLettersToIndex; private indexToColumnLetters; private rangeContainsDeletedCells; private adjustRangeForDeletion; adjustFormulaReferencesForColumnMove(sheetKey: string, sourceCol: number, targetCol: number, totalColCount: number, totalRowCount: number): { adjustedCells: FormulaCell[]; movedCells: FormulaCell[]; }; private adjustFormulaWithColumnMapping; adjustFormulaReferencesForRowMove(sheetKey: string, sourceRow: number, targetRow: number): { adjustedCells: FormulaCell[]; movedCells: FormulaCell[]; }; private adjustFormulaWithRowMapping; }