import type { CellAddress, CellRange, ColumnIconOption, ColumnStyle, ColumnStyleOption, FieldDef, FieldFormat, HeaderStyleOption, LayoutObjectId, MenuListItem, CellInfo, PivotInfo, CustomRenderFunctionArg, SparklineSpec, HierarchyState, Aggregation, IRowSeriesNumber, SortOption, FieldGetter, ColumnTypeOption, HeaderTypeOption } from '../../';
import type { Aggregator } from '../../dataset/aggregation';
import type { BaseTableAPI } from '../../base-table';
import type { HeaderDefine, ColumnDefine, ColumnBodyDefine } from '../define';
export type { HeaderDefine, ColumnDefine, ColumnBodyDefine, ColumnsDefine, LinkColumnDefine, ChartColumnDefine, ImageColumnDefine, SparklineColumnDefine, ProgressbarColumnDefine, TextColumnDefine, GroupColumnDefine } from '../define';
export interface HeaderData extends WidthData {
    id: LayoutObjectId;
    title?: string | (() => string);
    headerIcon?: string | ColumnIconOption | (string | ColumnIconOption)[] | ((args: CellInfo) => undefined | string | ColumnIconOption | (string | ColumnIconOption)[]);
    icons?: (string | ColumnIconOption)[] | ((args: CellInfo) => (string | ColumnIconOption)[]);
    field: FieldDef;
    fieldFormat?: FieldFormat;
    style?: HeaderStyleOption | ColumnStyle | null | undefined;
    headerType: HeaderTypeOption | ((args: CellInfo) => HeaderTypeOption);
    define: ColumnDefine;
    dropDownMenu?: MenuListItem[] | ((args: {
        row: number;
        col: number;
        table: BaseTableAPI;
    }) => MenuListItem[]);
    pivotInfo?: PivotInfo;
    hierarchyLevel?: number;
    dimensionTotalLevel?: number;
    hierarchyState?: HierarchyState;
    columnWidthComputeMode?: 'normal' | 'only-header' | 'only-body';
    showSort?: boolean | ((args: {
        row: number;
        col: number;
        table: BaseTableAPI;
    }) => boolean);
    sort?: SortOption;
    description?: string | ((args: CellInfo) => string);
    isEmpty?: boolean;
    parentCellId?: LayoutObjectId;
}
export interface WidthData {
    width?: number | string;
    minWidth?: number | string;
    maxWidth?: number | string;
    columnWidthComputeMode?: 'normal' | 'only-header' | 'only-body';
}
export interface ColumnData extends WidthData {
    id: LayoutObjectId;
    field: FieldDef;
    fieldFormat?: FieldFormat;
    icon?: string | ColumnIconOption | (string | ColumnIconOption)[] | ((args: CellInfo) => undefined | string | ColumnIconOption | (string | ColumnIconOption)[]);
    cellType: ColumnTypeOption | ((arg0: CellInfo) => ColumnTypeOption);
    chartModule?: string;
    chartSpec?: any | ((arg0: CellInfo) => any);
    chartInstance?: any;
    sparklineSpec?: SparklineSpec | ((arg0: CellInfo) => SparklineSpec);
    style: ColumnStyleOption | null | undefined;
    define: ColumnDefine;
    templateLink?: string | FieldGetter;
    columnWidthComputeMode?: 'normal' | 'only-header' | 'only-body';
    disableColumnResize?: boolean;
    aggregation?: Aggregation | Aggregation[];
    aggregator?: Aggregator | Aggregator[];
    isChildNode?: boolean;
}
export interface IndicatorData extends WidthData {
    id: LayoutObjectId;
    field: string | number;
    indicatorKey: string;
    fieldFormat?: FieldFormat;
    cellType: 'text' | 'link' | 'image' | 'video' | 'sparkline' | 'progressbar' | 'chart';
    chartModule?: string;
    chartSpec?: any | ((arg0: CustomRenderFunctionArg) => any);
    chartInstance?: any;
    noDataRenderNothing?: boolean;
    style?: ColumnStyleOption | null | undefined;
    define: ColumnDefine;
    icon?: string | ColumnIconOption | (string | ColumnIconOption)[] | ((args: CellInfo) => undefined | string | ColumnIconOption | (string | ColumnIconOption)[]);
    sparklineSpec?: SparklineSpec | ((arg0: CustomRenderFunctionArg) => SparklineSpec);
    disableColumnResize?: boolean;
}
export interface SeriesNumberColumnData extends WidthData {
    id: LayoutObjectId;
    title?: string | (() => string);
    field?: FieldDef;
    format?: (col?: number, row?: number, table?: BaseTableAPI, originValue?: string | number) => any;
    icon?: string | ColumnIconOption | (string | ColumnIconOption)[] | ((args: CellInfo) => undefined | string | ColumnIconOption | (string | ColumnIconOption)[]);
    headerIcon?: string | ColumnIconOption | (string | ColumnIconOption)[];
    cellType: 'text' | 'link' | 'image' | 'video' | 'checkbox' | 'radio';
    headerType: 'text' | 'link' | 'image' | 'video' | 'checkbox';
    style: ColumnStyleOption | null | undefined;
    define: IRowSeriesNumber;
    isChildNode?: false;
}
export type HeaderCellDefine = HeaderDefine & {
    colSpan?: number;
    rowSpan?: number;
};
export type CellDefine = ColumnBodyDefine & {
    colSpan?: number;
    rowSpan?: number;
};
export type ArrayLayoutDefine = CellDefine[][];
interface LayoutMapAPI {
    readonly headerLevelCount: number;
    readonly rowHeaderLevelCount: number;
    readonly columnHeaderLevelCount: number;
    readonly bodyRowSpanCount: number;
    readonly colCount: number | undefined;
    readonly rowCount: number | undefined;
    readonly columnWidths: WidthData[];
    readonly headerObjects: HeaderData[];
    readonly columnObjects: ColumnData[] | IndicatorData[];
    isHeader: (col: number, row: number) => boolean;
    getHeader: (col: number, row: number) => HeaderData | SeriesNumberColumnData;
    getHeaderField: (col: number, row: number) => FieldDef;
    getBody: (col: number, row: number) => ColumnData | IndicatorData | SeriesNumberColumnData;
    getCellId: (col: number, row: number) => LayoutObjectId;
    getCellRange: (col: number, row: number) => CellRange;
    getHeaderCellAdressById: (id: number) => CellAddress | undefined;
    getHeaderCellAddressByField: (field: string) => CellAddress | undefined;
    getRecordShowIndexByCell: (col: number, row: number) => number;
    getRecordStartRowByRecordIndex: (index: number) => number;
    getColumnWidthDefined: (col: number) => WidthData;
    release: () => void;
    isFrozenColumn: (col: number, row?: number) => boolean;
    isRightFrozenColumn: (col: number, row?: number) => boolean;
    isFrozenRow: (col: number, row?: number) => boolean;
    isBottomFrozenRow: (col: number, row?: number) => boolean;
}
export type { LayoutMapAPI };
