import PositionType from '../PositionType';
import Node from './Node';
declare class RootedTreeSet {
    private _rootNodes;
    protected _children: Node[];
    constructor();
    /**
           * @param root
           * @throws will throw an error if root is null or undefined
           */
    setRoot(root: Node): void;
    /** getter */
    getTreeRoots(): Node[];
    _decodate(node: Node): Node;
    /**
           * @param {mindplot.model.NodeModel} node
           * @throws will throw an error if node is null or undefined
           * @throws will throw an error if node with id already exists
           * @throws will throw an error if node has been added already
           */
    add(node: Node): void;
    /**
     * @param nodeId
     * @throws will throw an error if nodeId is null or undefined
     */
    remove(nodeId: number): void;
    /**
           * @param parentId
           * @param childId
           * @throws will throw an error if parentId is null or undefined
           * @throws will throw an error if childId is null or undefined
           * @throws will throw an error if node with id childId is already a child of parent
           */
    connect(parentId: number, childId: number): void;
    /**
           * @param nodeId
           * @throws will throw an error if nodeId is null or undefined
           * @throws will throw an error if node is not connected
           */
    disconnect(nodeId: number): void;
    /**
           * @param id
           * @param validate
           * @throws will throw an error if id is null or undefined
           * @throws will throw an error if node cannot be found
           * @return node
           */
    find(id: number, validate?: boolean): Node;
    private _find;
    /**
           * @param node
           * @throws will throw an error if nodeId is null or undefined
           * @return children
           */
    getChildren(node: Node): Node[];
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return root node or the provided node, if it has no parent
           */
    getRootNode(node: Node): any;
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return {Array} ancestors */
    getAncestors(node: Node): Node[];
    _getAncestors(node: Node, ancestors: Node[]): Node[];
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return {Array} siblings
           */
    getSiblings(node: Node): Node[];
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return {Boolean} whether the node has a single path to a single leaf (no branching)
           */
    hasSinglePathToSingleLeaf(node: Node): boolean;
    private _hasSinglePathToSingleLeaf;
    /**
           * @param node
           * @return {Boolean} whether the node is the start of a subbranch */
    isStartOfSubBranch(node: Node): boolean;
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return {Boolean} whether the node is a leaf
           */
    isLeaf(node: Node): boolean;
    /**
           * @param node
           * @throws will throw an error if node is null or undefined
           * @return parent
           */
    getParent(node: Node): Node;
    /**
           * @return result
           */
    dump(): string;
    _dump(node: Node, indent: string): string;
    /**
           * @param canvas
           */
    plot(canvas: any): void;
    _plot(canvas: any, node: Node, root?: any): void;
    /**
           * @param node
           * @param position
           */
    updateBranchPosition(node: Node, position: PositionType): void;
    /**
           * @param node
           * @param xOffset
           * @param yOffset
           */
    shiftBranchPosition(node: Node, xOffset: number, yOffset: number): void;
    /**
       * @param node
       * @param yOffset
       * @return siblings in the offset (vertical) direction, i.e. with lower or higher order
       */
    getSiblingsInVerticalDirection(node: Node, yOffset: number): Node[];
    /**
           * @param node
           * @param yOffset
           * @return branches of the root node on the same side as the given node's, in the given
           * vertical direction
           */
    getBranchesInVerticalDirection(node: Node, yOffset: number): Node[];
}
export default RootedTreeSet;
