import type { CellAddress, CellValue } from './base';
export interface IFormulaCell {
    sheet: string;
    address: CellAddress;
    formula: string;
    value: CellValue;
    dependencies: CellAddress[];
    error?: string;
}
export interface FormulaCell {
    sheet: string;
    row: number;
    col: number;
}
export interface IFormulaResult {
    value: CellValue;
    error?: string;
}
export interface FormulaResult {
    value: any;
    error?: string | any;
}
export interface IFormulaFunction {
    name: string;
    description: string;
    params: Array<{
        name: string;
        description: string;
        optional?: boolean;
    }>;
    execute: (...args: any[]) => CellValue;
}
export interface IFormulaManagerOptions {
    enabled: boolean;
    customFunctions?: Record<string, IFormulaFunction>;
    maxRecursionDepth?: number;
    cacheResults?: boolean;
}
export interface IFormulaManager {
    registerFormula: (cell: CellAddress, formula: string) => void;
    getFormula: (cell: CellAddress) => IFormulaCell | null;
    evaluateFormula: (formula: string, context?: any) => IFormulaResult;
    updateDependencies: (cell: CellAddress) => void;
    getDependentCells: (cell: CellAddress) => CellAddress[];
    checkCircularDependency: (cell: CellAddress, formula: string) => boolean;
    registerFunction: (func: IFormulaFunction) => void;
    getAllFormulas: () => Record<string, IFormulaCell>;
    clearCache: () => void;
    exportFormulas: () => Record<string, string>;
    importFormulas: (formulas: Record<string, string>) => void;
}
