import type { ListTable } from '@visactor/vtable'; import type { ICellData } from './types'; export interface IFormulaAwareTable { isFormulaCell: (col: number, row: number) => boolean; getCellFormula: (col: number, row: number) => string | undefined; setCellFormula: (col: number, row: number, formula: string) => void; getCalculatedValue: (col: number, row: number) => any; refreshFormulas: () => void; hasFormulaEngine: () => boolean; } export declare class DefaultFormulaAdapter implements IFormulaAwareTable { private table; constructor(table: ListTable); isFormulaCell(col: number, row: number): boolean; getCellFormula(col: number, row: number): string | undefined; setCellFormula(col: number, row: number, formula: string): void; getCalculatedValue(col: number, row: number): any; refreshFormulas(): void; hasFormulaEngine(): boolean; } export declare function createFormulaAdapter(table: ListTable, customIsFormulaCell?: (col: number, row: number, cellData: any, table: ListTable) => boolean, customGetCellFormula?: (col: number, row: number, cellData: any, table: ListTable) => string | undefined, customSetCellFormula?: (col: number, row: number, formula: string, table: ListTable) => void): IFormulaAwareTable; export declare class CustomFormulaAdapter implements IFormulaAwareTable { private table; private isFormulaCellFn?; private getCellFormulaFn?; private setCellFormulaFn?; constructor(table: ListTable, isFormulaCellFn?: (col: number, row: number, cellData: any, table: ListTable) => boolean, getCellFormulaFn?: (col: number, row: number, cellData: any, table: ListTable) => string | undefined, setCellFormulaFn?: (col: number, row: number, formula: string, table: ListTable) => void); isFormulaCell(col: number, row: number): boolean; getCellFormula(col: number, row: number): string | undefined; setCellFormula(col: number, row: number, formula: string): void; getCalculatedValue(col: number, row: number): any; refreshFormulas(): void; hasFormulaEngine(): boolean; } export interface IFormulaCellData extends ICellData { formula?: string; isFormula?: boolean; calculatedValue?: any; } export declare function enhanceCellDataWithFormula(cellData: ICellData, col: number, row: number, formulaAdapter: IFormulaAwareTable): IFormulaCellData;