import type { ColCell, RowCell } from '../../cell';
import { type CellMeta, type SimpleData } from '../../common';
import type { Node } from '../../facet/layout/node';
import type { SpreadSheet } from '../../sheet-type';
export declare function keyEqualTo(key: string, compareKey: string): boolean;
/**
 * 获取 intersection cell 所有的层级
 * @param {(RowCell | ColCell)[]} interactedCells
 */
export declare function getAllLevels(interactedCells: (RowCell | ColCell)[]): Set<number>;
/**
 * https://en.wikipedia.org/wiki/Comma-separated_values#Example
 * 根据 CSV、Excel 规范，按以下规则处理字段内容：
 * 若字段包含 ,、"、\r、\n 或 \t → 用双引号包裹字段。
 * 字段中的双引号 → 转义为两个双引号 ""。
 * 为了兼容直接粘贴纯文本到Excel单元格保持换行的场景，把\n替换成\r\n。但是\r\n不做替换
 * @param field
 */
export declare const escapeField: (field: SimpleData) => SimpleData;
export declare const getHeaderMeasureFieldNames: (fields: string[], spreadsheet: SpreadSheet, formatHeader?: boolean) => SimpleData[];
/**
 * 根据 id 计算出行头或者列头展示的文本数组
 * 将 id : root[&]家具[&]桌子[&]price"
 * startLevel 不传, 转换为 List: ['家具', '桌子', 'price']
 * startLevel = 1, 转换为 List: ['家具', '桌子', 'price']
 * @param headerId
 * @param startLevel 层级
 */
export declare const getHeaderList: (headerId: string, startLevel?: number) => string[];
/**
 * 获取 col node 对应的 field。e.g. field: age
 * @param {() => boolean} isPivotMode
 * @param {Node} colNode
 * @return {string | undefined}
 */
export declare const getColNodeFieldFromNode: (isPivotMode: () => boolean, colNode?: Node) => string | undefined;
export declare const getSelectedCols: (cells: CellMeta[]) => CellMeta[];
export declare const getSelectedRows: (cells: CellMeta[]) => CellMeta[];
