import TreeModel from 'tree-model';
import { NodeRenderView } from './NodeRenderView';
import { RenderTree } from './RenderTree';
import { NodeMap } from './NodeMap';
export type TreeNode = TreeModel.Node<NodeData>;
export type SearchPredicate = (node: TreeNode) => boolean;
export type AsyncSearchPredicate = (node: TreeNode) => Promise<boolean>;
export interface NodeData {
    raw: {
        [prop: string]: any;
    };
    children: TreeNode[];
    nestedNodes: TreeNode[];
    atomic: boolean;
    subtreeId?: number;
    renderView?: NodeRenderView;
    instanced?: boolean;
}
export declare class WorldTree {
    private renderTreeInstances;
    nodeMaps: {
        [id: string]: NodeMap;
    };
    private readonly supressWarnings;
    static readonly ROOT_ID = "ROOT";
    private subtreeId;
    constructor();
    getRenderTree(subtreeId?: string): RenderTree;
    private tree;
    _root: TreeNode;
    get root(): TreeNode;
    get nextSubtreeId(): number;
    get nodeCount(): number;
    isRoot(node: TreeNode): boolean;
    isSubtreeRoot(node: TreeNode): boolean;
    parse(model: any): TreeModel.Node<any>;
    addSubtree(node: TreeNode): void;
    addNode(node: TreeNode, parent: TreeNode): void;
    removeNode(node: TreeNode): void;
    findAll(predicate: SearchPredicate, node?: TreeNode): Array<TreeNode>;
    findId(id: string, subtreeId?: number): any;
    findSubtree(id: string): any;
    getAncestors(node: TreeNode): Array<TreeNode>;
    getInstances(subtree: string): {
        [id: string]: Record<string, TreeNode>;
    };
    walk(predicate: SearchPredicate, node?: TreeNode): void;
    walkAsync(predicate: SearchPredicate, node?: TreeNode): Promise<boolean>;
    purge(subtreeId?: string): void;
}
