import { ICell, IColumn, IColumnComponent, IColumnManager, IRow } from '../../../../../../types/src/table';
import { default as CoreFeature } from '../CoreFeature';
import { ColumnDefinition } from '../types';
import { default as ColumnComponent } from './ColumnComponent';

export default class Column extends CoreFeature implements IColumn {
    static readonly defaultOptionList: {
        columns: undefined;
        cssClass: undefined;
        editableTitle: undefined;
        field: undefined;
        headerHozAlign: undefined;
        headerVertical: undefined;
        headerWordWrap: boolean;
        hidden: undefined;
        hozAlign: undefined;
        maxInitialWidth: undefined;
        maxWidth: undefined;
        minWidth: number;
        title: undefined;
        variableHeight: undefined;
        vertAlign: undefined;
        width: undefined;
    };
    definition: ColumnDefinition;
    parent: IColumnManager | IColumn;
    readonly type: 'column';
    columns: IColumn[];
    cells: ICell[];
    isGroup: boolean;
    isRowHeader: boolean;
    element: HTMLElement | false;
    contentElement: HTMLElement | false;
    titleHolderElement: HTMLElement | false;
    titleElement: HTMLElement | false;
    groupElement: HTMLElement | false;
    hozAlign: string;
    vertAlign: string;
    field: string | false;
    fieldStructure: string[];
    getFieldValue: (data: Record<string, any>) => any;
    setFieldValue: (data: Record<string, any>, value: any) => void;
    titleDownload: string | null;
    titleFormatterRendered: (() => void) | false;
    modules: Record<string, any>;
    width: number | null;
    widthStyled: string;
    maxWidth: number | null;
    maxWidthStyled: string;
    maxInitialWidth: number | null;
    minWidth: number | null;
    minWidthStyled: string;
    widthFixed: boolean;
    hidden: boolean;
    component: ColumnComponent | null;
    silent?: boolean;
    constructor(def: ColumnDefinition, parent: IColumnManager | IColumn, rowHeader?: boolean);
    createElement(): HTMLElement;
    createGroupElement(): HTMLElement;
    mapDefinitions(): void;
    checkDefinition(): void;
    setField(field: string | undefined): void;
    registerColumnPosition(column: IColumn): void;
    registerColumnField(column: IColumn): void;
    reRegisterPosition(): void;
    _initialize(): Promise<void>;
    _buildColumnHeader(): Promise<void>;
    _buildColumnHeaderContent(): HTMLElement;
    _buildColumnHeaderTitle(): HTMLElement;
    _formatColumnHeaderTitle(el: HTMLElement, title: string): void;
    _buildGroupHeader(): void;
    _getFlatData(data: Record<string, any>): any;
    _getNestedData(data: Record<string, any>): any;
    _setFlatData(data: Record<string, any>, value: any): void;
    _setNestedData(data: Record<string, any>, value: any): void;
    attachColumn(column: IColumn): void;
    verticalAlign(alignment?: string, height?: number): void;
    clearVerticalAlign(): void;
    /**
     * Retrieve Column Information
     */
    getElement(): HTMLElement;
    getGroupElement(): HTMLElement;
    getField(): string;
    getTitleDownload(): string | null;
    getFirstColumn(): IColumn | false;
    getLastColumn(): IColumn | false;
    getColumns(traverse?: boolean): IColumn[];
    getCells(): ICell[];
    getTopColumn(): IColumn;
    getDefinition(updateBranches?: boolean): ColumnDefinition;
    /**
     * Actions
     */
    checkColumnVisibility(): Promise<void>;
    show(silent?: boolean, responsiveToggle?: boolean): Promise<void>;
    hide(silent?: boolean, responsiveToggle?: boolean): void;
    matchChildWidths(): void;
    removeChild(child: Column): void;
    setWidth(width: number | string): void;
    setWidthActual(width: number | string): void;
    checkCellHeights(): void;
    getWidth(): number;
    getLeftOffset(): number;
    getHeight(): number;
    setMinWidth(minWidth: number | undefined): void;
    setMaxWidth(maxWidth: number | undefined): void;
    delete(): Promise<void>;
    columnRendered(): void;
    /**
     * Cell Management
     */
    generateCell(row: IRow): ICell;
    nextColumn(): IColumn | false;
    _nextVisibleColumn(index: number): IColumn | false;
    prevColumn(): IColumn | false;
    _prevVisibleColumn(index: number): IColumn | false;
    reinitializeWidth(force?: boolean): Promise<void>;
    fitToData(force?: boolean): void;
    updateDefinition(updates: Partial<ColumnDefinition>): Promise<IColumnComponent>;
    deleteCell(cell: ICell): void;
    /**
     * Object Generation
     */
    getComponent(): ColumnComponent;
    getPosition(): number;
    getParentComponent(): ColumnComponent | false;
}
