import { ColumnState, GridApi, GridOptions, GridState } from 'ag-grid-enterprise';
import { PivotLayoutModel, TableLayoutModel } from './LayoutManagerModel';
import { LMEmitter } from './LMEmitter';
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;
    constructor(options: LayoutManagerOptions);
    destroy(): void;
    private setupEvents;
    private setupSetColumnDefs;
    private globalAgGridEventListener;
    private columnDefsChanged;
    private indexColumns;
    private getColDefById;
    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 getAGGridInitialStateForLayout(layout: TableLayoutModel | PivotLayoutModel, colDefs: GridOptions['columnDefs'], options?: {
        isTree: boolean;
    }): GridState;
    static getAGGridInitialStateForTableLayout(layout: TableLayoutModel, colDefs: GridOptions['columnDefs'], _options?: {
        isTree: boolean;
    }): 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;
    }): boolean;
    isCurrentLayoutPivot(): boolean;
    private applyLayout;
    private applyTableLayout;
    private getRowGroupNodePathsAs;
    applyRowGroupValues(RowGroupValues: TableLayoutModel['RowGroupValues']): void;
    private computeColumnStateForPivotLayout;
    private computePivotAggregations;
    private computeColumnStateForTableLayout;
    private computePinnedColumns;
    private computeAggregations;
    private computeRowGrouping;
    private computeColumnSorts;
    private getDefaultColumnWidthForCol;
    private computeColumnWidths;
    private computeColumnOrderAndVisibility;
    autoSizeColumns(columnIds?: string[]): false | string[];
    private applyPivotLayout;
    applyPivotTotals(layout: PivotLayoutModel): void;
    applyPivotExpandLevel(layout: PivotLayoutModel): void;
    private withSuppressColumnAnimation;
    private patchColDefType;
    private setupPivotTotals;
    private patchPivotTotalColumn;
    private getPivotTotalColumnConfig;
}
export {};
