import { ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
import { LMEmitter } from './LMEmitter';
export declare const PIVOT_ANY_TOTAL_COL_TYPE = "pivotAnyTotal";
export declare const PIVOT_GRAND_TOTAL_COL_TYPE = "pivotGrandTotal";
export declare const PIVOT_COLUMN_TOTAL_COL_TYPE = "pivotColumnTotal";
export declare const PIVOT_AGGREGATION_TOTAL_COL_TYPE = "pivotAggregationTotal";
export type LayoutManagerOptions = {
    gridApi: GridApi;
    debugId: string;
    layoutChangeDebounce?: number;
};
type ApplyLayoutOptions = {
    skipApplyRowGroupsExpandedState?: boolean;
};
export declare class LayoutManager<DATA_TYPE = any> extends LMEmitter {
    private gridApi;
    private fieldsToIds;
    private idsToFields;
    private idsToColDefs;
    private initialColumnWidths;
    private currentLayout;
    private layoutChangeDebounce?;
    private _prevFiredLayout;
    private setGridOption_default;
    private suppressGlobalAgGridEventListener;
    private supressGlobalAgGridEventTimeoutId;
    private layoutManagerDebugId;
    constructor(options: LayoutManagerOptions);
    destroy(): void;
    private setupEvents;
    private setupSetColumnDefs;
    private globalAgGridEventListener;
    private columnDefsChanged;
    private indexColumns;
    private onGridLayoutChanged;
    private triggerGridLayoutChange;
    onChange(fn: (layout: TableLayoutModel | PivotLayoutModel) => void): () => void;
    onColumnDefsChanged(fn: (colDefs: GridOptions['columnDefs']) => void): () => void;
    setOptions(options: LayoutManagerOptions): void;
    getLayoutModelFromGrid(): TableLayoutModel | PivotLayoutModel;
    getPivotLayoutModelFromGrid(): PivotLayoutModel;
    getTableLayoutModelFromGrid(): TableLayoutModel;
    private isTreeMode;
    getUndecidedLayoutModelFromGrid(columnState: ColumnState[]): TableLayoutModel | PivotLayoutModel;
    static getColumnDefsChangesForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs']): GridOptions['columnDefs'] | null;
    static getAGGridInitialStateForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs'], options: {
        isTree: boolean;
        colTypes: GridOptions['columnTypes'];
        defaultColDef: GridOptions['defaultColDef'];
    }): GridState;
    static getAGGridInitialStateForTableLayout(layout: TableLayoutModel, colDefs: GridOptions['columnDefs'], _options?: {
        isTree?: boolean;
        colTypes?: GridOptions['columnTypes'];
        defaultColDef?: GridOptions['defaultColDef'];
    }): GridState;
    static getAGGridInitialStateForPivotLayout(layout: PivotLayoutModel, colDefs: GridOptions['columnDefs']): GridState;
    silentSetCurrentLayout(layout: TableLayoutModel | PivotLayoutModel, options?: {
        normalize?: boolean;
    }): void;
    setLayout(layout: TableLayoutModel | PivotLayoutModel, options?: ApplyLayoutOptions & {
        force?: boolean;
        skipTriggerChange?: boolean;
    }): boolean;
    isCurrentLayoutPivot(): boolean;
    private suspendAgGridListener;
    private resumeAgGridListener;
    private applyLayout;
    private getLayoutDetailsAsString;
    applyColumnDefsChanges(layout: TableLayoutModel | PivotLayoutModel): boolean;
    private applyColumnSizingColumnDefsChanges;
    private applyTableLayout;
    private getRowGroupNodePathsAs;
    applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues'], rowGroupedColumns: string[]): void;
    private computeColumnStateForPivotLayout;
    private computePivotAggregations;
    private computeColumnStateForTableLayout;
    private computePinnedColumns;
    private computeAggregations;
    private computeRowGrouping;
    private computeColumnSorts;
    private getDefaultColumnWidthForCol;
    private computeColumnSizing;
    private computeColumnOrderAndVisibility;
    autoSizeColumns(columnIds?: string[]): false | string[];
    private applyPivotLayout;
    applyPivotTotals(layout: PivotLayoutModel): void;
    applyColumnGroupCollapseExpandState(layout: PivotLayoutModel | TableLayoutModel): void;
    private withSuppressColumnAnimation;
    private withSuppressRowAnimation;
    /**
     * Refreshes the sort order by refreshing the client side row model.
     * This is useful when custom sort comparers are defined and the sort needs to be re-applied after filtering.
     */
    refreshSort(): void;
    private patchColDefType;
    private setupPivotTotals;
    private patchPivotAggregationTotal;
    private getPivotTotalColumnConfig;
    private isInPivotMode;
}
export {};
