import { BehaviorSubject } from 'rxjs';
export interface Dictionary<T> {
    [id: number]: T;
}
export interface ITreeNodeData {
    id?: number | string;
    parentId?: number | string;
    title?: string;
    isOpen?: boolean;
    data?: any;
    isParent?: boolean;
    loading?: boolean;
    isMatch?: boolean;
    isHide?: boolean;
    isActive?: boolean;
    isChecked?: boolean;
    disabled?: boolean;
    [prop: string]: any;
    children?: [];
}
export interface ITreeMap {
    [index: number]: ITreeNodeData;
}
export interface ITreeItem {
    title?: string;
    open?: boolean;
    loading?: boolean;
    isMatch?: boolean;
    items?: ITreeItem[];
    isParent?: boolean;
    data?: any;
    id?: number | string;
    isHide?: boolean;
    isActive?: boolean;
    isChecked?: boolean;
    halfChecked?: boolean;
    disabled?: boolean;
    showCheckbox?: boolean;
    [prop: string]: any;
    disableAdd?: boolean;
    disableEdit?: boolean;
    disableDelete?: boolean;
    disableSelect?: boolean;
    disableToggle?: boolean;
}
export interface ITreeInput {
    treeItems: Array<ITreeItem>;
    parentId?: number | string;
    treeNodeChildrenKey?: string;
    treeNodeIdKey?: string;
    checkboxDisabledKey?: string;
    selectDisabledKey?: string;
    toggleDisabledKey?: string;
    treeNodeTitleKey?: string;
    isVirtualScroll?: boolean;
}
export declare class TreeNode implements ITreeNodeData {
    id: any;
    parentId: any;
    data: any;
    constructor(id: any, parentId: any, data: any);
}
export declare class TreeFactory {
    isVirtualScroll: any;
    nodes: Dictionary<TreeNode>;
    private idx;
    private _checked;
    private _treeRoot;
    searchItem: string;
    flattenNodes: BehaviorSubject<TreeNode[]>;
    virtualScroll: boolean;
    static create(isVirtualScroll: any): TreeFactory;
    static fromTree({ treeItems, isVirtualScroll, treeNodeChildrenKey, treeNodeIdKey, checkboxDisabledKey, selectDisabledKey, // 默认值与checkboxDisabledKey相同，为了兼容以前tree的disable情况
    toggleDisabledKey, treeNodeTitleKey, }: ITreeInput): TreeFactory;
    constructor(isVirtualScroll: any);
    mapTreeItems: ({ treeItems, parentId, treeNodeChildrenKey, treeNodeIdKey, checkboxDisabledKey, selectDisabledKey, toggleDisabledKey, treeNodeTitleKey, }: ITreeInput, renderTree?: boolean) => this;
    addNode({ id, parentId, ...data }: ITreeNodeData, index?: any, renderTree?: boolean): TreeNode;
    editNodeTitle(id: number | string): void;
    deleteNodeById(id: number | string, renderTree?: boolean): this;
    toggleNodeById(id: number | string): this;
    openNodesById(id: number | string): this;
    closeNodesById(id: number | string, closeChildren?: boolean): this;
    disabledNodesById(id: number | string): this;
    private _disabledParentNodes;
    checkNodesById(id: number | string, checked: boolean, checkableRelation?: 'upward' | 'downward' | 'both' | 'none'): Array<Object>;
    checkParentNodes(node: TreeNode): void;
    private checkChildNodes;
    getCheckedNodes(): Array<any>;
    getActivatedNodes(): Array<any>;
    getDisabledNodes(): Array<any>;
    activeNodeById(id: number | string, isMultiple?: boolean): void;
    getChildrenById(id: number | string): Array<TreeNode>;
    startLoading(id: number | string): void;
    endLoading(id: number | string): void;
    getNodeById(id: number | string): any;
    getCompleteNodeById(id: number | string): any;
    hideNodeById(id: number | string, hide: boolean): this;
    private maintainCheckedNodeList;
    private dfs;
    addChildNode(parentNode: TreeNode, childNode: TreeNode, index?: any): void;
    private removeChildNode;
    private resetSearchResults;
    searchTree(target: string, hideUnmatched?: boolean, keyword?: any, pattern?: any): any;
    get treeRoot(): TreeNode[];
    deactivateAllNodes(): void;
    checkAllNodes(checked: boolean): void;
    getNodeIndex(node: TreeNode): number;
    checkIsParent(childNodeId: number | string, parentNodeId: number | string): any;
    getFlattenNodes(): void;
    flattenTree(): any[];
    mergeTreeNodes(targetNode?: TreeNode[]): void;
    renderFlattenTree(): void;
    disableAllNodesChecked(disabled?: boolean): void;
    disableAllNodesSelected(disabled?: boolean): void;
    disableAllNodesToggled(disabled?: boolean): void;
    transferToTreeNode(originNode: any, parentId?: any, treeNodeChildrenKey?: string, treeNodeIdKey?: string, checkboxDisabledKey?: string, selectDisabledKey?: string, toggleDisabledKey?: string, treeNodeTitleKey?: string): TreeNode;
}
