export default PDOMTree;
declare namespace PDOMTree {
    /**
     * Called when a child node is added to a parent node (and the child is likely to have pdom content).
     * @public
     *
     * @param {Node} parent
     * @param {Node} child
     */
    function addChild(parent: Node, child: Node): void;
    /**
     * Called when a child node is removed from a parent node (and the child is likely to have pdom content).
     * @public
     *
     * @param {Node} parent
     * @param {Node} child
     */
    function removeChild(parent: Node, child: Node): void;
    /**
     * Called when a node's children are reordered (no additions/removals).
     * @public
     *
     * @param {Node} node
     */
    function childrenOrderChange(node: Node): void;
    /**
     * Called when a node has a pdomOrder change.
     * @public
     *
     * @param {Node} node
     * @param {Array.<Node|null>|null} oldOrder
     * @param {Array.<Node|null>|null} newOrder
     */
    function pdomOrderChange(node: Node, oldOrder: Array<Node | null> | null, newOrder: Array<Node | null> | null): void;
    /**
     * Called when a node has a pdomContent change.
     * @public
     *
     * @param {Node} node
     */
    function pdomContentChange(node: Node): void;
    /**
     * Sets up a root instance with a given root node.
     * @public
     *
     * @param {PDOMInstance} rootInstance
     */
    function rebuildInstanceTree(rootInstance: PDOMInstance): void;
    /**
     * Handles the conceptual addition of a pdom subtree.
     * @private
     *
     * @param {Node} parent
     * @param {Node} child
     * @param {Array.<PartialPDOMTrail>} [pdomTrails] - Will be computed if needed
     */
    function addTree(parent: Node, child: Node, pdomTrails?: Array<PartialPDOMTrail>): void;
    /**
     * Handles the conceptual removal of a pdom subtree.
     * @private
     *
     * @param {Node} parent
     * @param {Node} child
     * @param {Array.<PartialPDOMTrail>} [pdomTrails] - Will be computed if needed
     */
    function removeTree(parent: Node, child: Node, pdomTrails?: Array<PartialPDOMTrail>): void;
    /**
     * Handles the conceptual sorting of a pdom subtree.
     * @private
     *
     * @param {Node} node
     * @param {Array.<PartialPDOMTrail>} [pdomTrails] - Will be computed if needed
     */
    function reorder(node: Node, pdomTrails?: Array<PartialPDOMTrail>): void;
    /**
     * Creates PDOM instances, returning an array of instances that should be added to the next level.
     * @private
     *
     * NOTE: Trails for which an already-existing instance exists will NOT create a new instance here. We only want to
     * fill in the "missing" structure. There are cases (a.children=[b,c], b.children=[c]) where removing an
     * pdomOrder can trigger addTree(a,b) AND addTree(b,c), and we can't create duplicate content.
     *
     * @param {Trail} trail
     * @param {Display} display
     * @param {PDOMInstance} parentInstance - Since we don't create the root here, can't be null
     * @returns {Array.<PDOMInstance>}
     */
    function createTree(trail: Trail, display: Display, parentInstance: PDOMInstance): Array<PDOMInstance>;
    /**
     * Prepares for a pdom-tree-changing operation (saving some state). During DOM operations we don't want Display
     * input to dispatch events as focus changes.
     * @private
     * @returns {Node|null}
     */
    function beforeOp(): Node | null;
    /**
     * Finalizes a pdom-tree-changing operation (restoring some state).
     * @param {Node|null} focusedNode
     * @private
     */
    function afterOp(focusedNode: Node | null): void;
    /**
     * Returns all "pdom" trails from this node ancestor-wise to nodes that have display roots.
     * @private
     *
     * NOTE: "pdom" trails may not have strict parent-child relationships between adjacent nodes, as remapping of
     * the tree can have a "PDOM parent" and "pdom child" case (the child is in the parent's pdomOrder).
     *
     * @param {Node} node
     * @returns {Array.<PartialPDOMTrail>}
     */
    function findPDOMTrails(node: Node): Array<PartialPDOMTrail>;
    /**
     * Finds all partial "pdom" trails
     * @private
     *
     * @param {Array.<PartialPDOMTrail>} trailResults - Mutated, this is how we "return" our value.
     * @param {Trail} trail - Where to start from
     */
    function recursivePDOMTrailSearch(trailResults: Array<PartialPDOMTrail>, trail: Trail): void;
    /**
     * Ensures that the pdomDisplays on the node (and its subtree) are accurate.
     * @public
     */
    function auditPDOMDisplays(node: any): void;
    /**
     * Checks a given Node (with assertions) to ensure it is not part of a cycle in the combined graph with edges
     * defined by "there is a parent-child or pdomParent-pdomOrder" relationship between the two nodes.
     * @public (scenery-internal)
     *
     * See https://github.com/phetsims/scenery/issues/787 for more information (and for some detail on the cases
     * that we want to catch).
     *
     * @param {Node} node
     */
    function auditNodeForPDOMCycles(node: Node): void;
    /**
     * Returns a string representation of an order (using Node ids) for debugging.
     * @private
     *
     * @param {Array.<Node|null>|null} pdomOrder
     * @returns {string}
     */
    function debugOrder(pdomOrder: Array<Node | null> | null): string;
}
import { Node } from '../../imports.js';
import { PDOMInstance } from '../../imports.js';
import { PartialPDOMTrail } from '../../imports.js';
import { Trail } from '../../imports.js';
//# sourceMappingURL=PDOMTree.d.ts.map