import { ColDef, ColGroupDef } from 'ag-grid-community';
import { LogicalQuery } from '../types/workbook';

export declare const PIVOT_COLUMN_KEY_SEPARATOR = "__";
export interface PivotCombinationPathEntry {
    column: string;
    label: string;
    value: string | number | null;
}
export interface PivotCombination {
    key: string;
    values: (string | number | null)[];
    path: PivotCombinationPathEntry[];
}
export interface PivotPlaceholderDescriptor {
    key: string;
    path: PivotCombinationPathEntry[];
}
export interface PivotConfig {
    columns: string[];
    measureColumns: string[];
    nonPivotColumns: string[];
    pivotColumns: string[];
    pivotCombinations: PivotCombination[];
}
export declare const formatPivotValueLabel: (value: string | number | null | undefined) => string;
export declare const buildPivotCombinationKey: (values: (string | number | null | undefined)[]) => string;
export declare const buildPivotColumnId: (combinationKey: string, measureColumn: string) => string;
export declare const buildPivotCombinations: (data: any[][], columns: string[], pivotColumns: string[]) => PivotCombination[];
export declare const buildPivotPlaceholderDescriptors: (pivotColumnNames: string[], pivotCombinations: PivotCombination[]) => PivotPlaceholderDescriptor[];
export declare function pivotData(data: any[][], config: PivotConfig): Record<string, any>[];
type LogicalQueryMember = string | {
    alias?: string | null;
    name?: string | null;
};
export type LogicalQueryKey = 'dimensions' | 'measures' | 'customMeasures' | 'customDimensions';
export type LogicalMemberMatch = {
    member: LogicalQueryMember;
    queryKey: LogicalQueryKey;
    memberIndex: number;
};
export declare const findLogicalMemberMatch: (columnId: string, logicalQuery?: LogicalQuery | null) => LogicalMemberMatch | null;
type PivotLabelColumnOptions = {
    pivotTitles: string[];
    hasNonPivotColumns: boolean;
    backgroundColor?: string;
};
export declare const createPivotLabelColumn: ({ pivotTitles, hasNonPivotColumns, backgroundColor, }: PivotLabelColumnOptions) => ColDef | null;
type PivotGroupEntry = {
    path: PivotCombinationPathEntry[];
    columns: ColDef[];
};
type BuildPivotGroupsOptions = {
    headerGroupComponent?: any;
};
export declare const buildPivotGroupsFromEntries: (entries: PivotGroupEntry[], { headerGroupComponent }?: BuildPivotGroupsOptions) => ColGroupDef[];
export {};
//# sourceMappingURL=pivot-utils.d.ts.map