import { default as CxIconButton } from '../../../../../../atoms/src/components/icon-button/icon-button.ts';
import { IRow } from '../../../../../../types/src/table';
import { default as Module } from '../../core/Module';
import { default as Row } from '../../core/row/Row';
import { default as RowComponent } from '../../core/row/RowComponent';
import { default as Tabulator } from '../../core/Tabulator';

type StartOpenFunction = (row: RowComponent, index: number) => boolean;
export default class DataTree extends Module {
    static readonly moduleName = "dataTree";
    indent: number;
    field: string;
    loadingField: string;
    hasMoreField: string;
    collapseEl: HTMLElement | null;
    expandEl: CxIconButton | HTMLElement | null;
    branchEl: HTMLElement | null;
    elementField: string | false;
    startOpen: StartOpenFunction;
    constructor(table: Tabulator);
    initialize(): void;
    tableRedrawing(force?: boolean): void;
    initializeElementField(): void;
    getRowChildren(row: Row): RowComponent[];
    columnMoving(): IRow[];
    rowDataChanged(row: Row, visible: boolean, updatedData: Record<string, any>): void;
    cellValueChanged(cell: any): void;
    initializeRow(row: Row): void;
    reinitializeRowChildren(row: IRow): void;
    layoutRow(row: Row): void;
    generateControlElement(row: Row, el?: HTMLElement | null): void;
    getRows(rows: IRow[]): IRow[];
    getChildren(row: Row, allChildren: boolean, sortOnly: boolean): Row[];
    generateChildren(row: IRow): IRow[];
    generateLoadMoreButton({ childLevel, parentRow, }: {
        childLevel: number;
        parentRow: IRow;
    }): IRow;
    generateLoadingRow({ childLevel, parentRow, }: {
        childLevel: number;
        parentRow: IRow;
    }): IRow;
    expandRow(row: Row, _silent?: boolean): void;
    loadRowChildren(row: Row): Promise<void>;
    collapseRow(row: Row): void;
    toggleRow(row: Row): void;
    isRowExpanded(row: Row): boolean;
    getTreeParent(row: Row): RowComponent | false;
    getTreeParentRoot(row: Row): Row;
    getFilteredTreeChildren(row: Row): Row[];
    rowDeleting(row: Row): void;
    rowDelete(row: Row): void;
    addTreeChildRow(row: Row, data: Record<string, any> | string, top?: boolean, index?: any): void;
    findChildIndex(subject: any, parent: Row): number | false;
    getTreeChildren(row: IRow, component: boolean, recurse: boolean): IRow[] | RowComponent[];
    getChildField(): string;
    redrawNeeded(data: Record<string, any>): boolean;
}
export {};
