import { ICell, IColumn, IColumnComponent, IColumnManager, IRow, ITabulator } from '../../../../../types/src/table';
import { default as Column } from './column/Column';
import { default as CoreFeature } from './CoreFeature';
import { default as Renderer } from './rendering/Renderer';
import { default as OptionsList } from './tools/OptionsList';
import { ColumnDefinition, ColumnLookup, ScrollToColumnPosition } from './types';

export default class ColumnManager extends CoreFeature implements IColumnManager {
    blockHozScrollEvent: boolean;
    headersElement: HTMLElement | null;
    contentsElement: HTMLElement | null;
    rowHeader: IColumn | null;
    element: HTMLElement | undefined;
    columns: IColumn[];
    columnsByIndex: IColumn[];
    columnsByField: Record<string, IColumn>;
    scrollLeft: number;
    optionsList: OptionsList;
    redrawBlock: boolean;
    redrawBlockUpdate: boolean | null;
    renderer: Renderer | null;
    tableElement: HTMLElement | undefined;
    constructor(table: ITabulator);
    initialize(): void;
    updateLastCellClass(): void;
    padVerticalScrollbar(width: number): void;
    initializeRenderer(): void;
    createHeadersElement(): HTMLElement;
    createHeaderContentsElement(): HTMLElement;
    createHeaderElement(): HTMLElement;
    getElement(): HTMLElement | undefined;
    getContentsElement(): HTMLElement | null;
    getHeadersElement(): HTMLElement | null;
    scrollHorizontal(left: number): void;
    initializeScrollWheelWatcher(): void;
    generateColumnsFromRowData(data: Array<Record<string, any>>): void;
    calculateSorterFromValue(value: any): 'string' | 'number' | 'boolean' | 'time' | 'alphanum' | 'exists' | 'date' | 'datetime' | 'array';
    setColumns(cols: ColumnDefinition[]): void;
    _addColumn(definition: ColumnDefinition, before?: boolean, nextToColumn?: IColumn | IColumnComponent | false): IColumn;
    registerColumnField(col: Column): void;
    registerColumnPosition(col: Column): void;
    _reIndexColumns(): void;
    verticalAlignHeaders(): void;
    findColumn(subject: ColumnLookup): IColumn | false;
    getColumnByField(field: string): IColumn | undefined;
    getColumnsByFieldRoot(root: string): IColumn[];
    getColumnByIndex(index: number): IColumn | undefined;
    getFirstVisibleColumn(): IColumn | false;
    getVisibleColumnsByIndex(): IColumn[];
    getColumns(): IColumn[];
    findColumnIndex(column: IColumn | IColumnComponent | false): number | false;
    getRealColumns(): IColumn[];
    traverse(callback: (column: IColumn, index: number) => void): void;
    getDefinitions(active?: boolean): ColumnDefinition[];
    getDefinitionTree(): ColumnDefinition[];
    getComponents(structured?: boolean): IColumnComponent[];
    getWidth(): number;
    moveColumn(from: IColumn, to: IColumn, after?: boolean): void;
    moveColumnActual(from: IColumn, to: IColumn, after?: boolean): void;
    _moveColumnInArray(columns: IColumn[], from: IColumn, to: IColumn, after?: boolean, updateRows?: boolean): void;
    scrollToColumn(column: Column, position?: ScrollToColumnPosition, ifVisible?: boolean): Promise<void>;
    generateCells(row: IRow): ICell[];
    getFlexBaseWidth(): number;
    addColumn(definition: ColumnDefinition, before?: boolean, nextToColumn?: IColumn | IColumnComponent | false): Promise<IColumn>;
    deregisterColumn(column: IColumn): void;
    rerenderColumns(update?: boolean, silent?: boolean): void;
    refreshVisibilityLayout(): void;
    blockRedraw(): void;
    restoreRedraw(): void;
    redraw(force?: boolean): void;
}
