import type { AgColumn, BeanCollection, ColumnModel } from 'ag-grid-community';
import type { FormulaNode } from './utils';
export declare function colIndexFromId(colModel: ColumnModel, cols: AgColumn[], colId: string): number | null;
export declare function colIdFromIndex(cols: AgColumn[], idx: number): string | null;
export declare function rowIndexFromId(beans: BeanCollection, rowId: string): number | null;
export declare function rowIdFromIndex(beans: BeanCollection, idx: number): string | null;
/**
 * Serializes a formula AST into a string representation.
 * @param beans The bean collection.
 * @param root The root node of the formula AST.
 * @param useRefFormat Whether to use the REF format (db safe) or A1 format (editor safe).
 * @returns The serialized formula string.
 *
 * @example
 * useRefFormat = true  -> REF(COLUMN(...),ROW(...))
 * useRefFormat = false -> A1 ($A$1:$B2)
 */
export declare function serializeFormula(beans: BeanCollection, root: FormulaNode, useRefFormat: boolean, unsafe: boolean): string;
