import '../../../assert/js/assert.js';
import '../../../globals.js';
import Vector2 from '../../../dot/js/Vector2.js';
import { Node, Trail } from '../imports.js';
export default class Picker {
    private readonly node;
    private selfPruned;
    private selfInclusive;
    private subtreePrunable;
    private subtreePickableCount;
    private mouseInclusiveBounds;
    private mouseExclusiveBounds;
    private touchInclusiveBounds;
    private touchExclusiveBounds;
    private mouseInclusiveDirty;
    private mouseExclusiveDirty;
    private touchInclusiveDirty;
    private touchExclusiveDirty;
    private scratchVector;
    constructor(node: Node);
    hitTest(point: Vector2, useMouse: boolean, useTouch: boolean): Trail | null;
    /**
     * @param point
     * @param useMouse
     * @param useTouch
     * @param isInclusive - Essentially true if there is an ancestor or self with an input listener
     */
    private recursiveHitTest;
    /**
     * Recursively sets dirty flags to true. If the andExclusive parameter is false, only the "inclusive" flags
     * are set to dirty.
     *
     * @param andExclusive
     * @param [ignoreSelfDirty] - If true, will invalidate parents even if we were dirty.
     */
    private invalidate;
    /**
     * Computes the mouseInclusiveBounds for this picker (if dirty), and recursively validates it for all non-pruned
     * children.
     *
     * NOTE: For the future, consider sharing more code with related functions. I tried this, and it made things look
     * more complicated (and probably slower), so I've kept some duplication. If a change is made to this function,
     * please check the other validate* methods to see if they also need a change.
     */
    private validateMouseInclusive;
    /**
     * Computes the mouseExclusiveBounds for this picker (if dirty), and recursively validates the mouse-related bounds
     * for all non-pruned children.
     *
     * Notably, if a picker is selfInclusive, we will switch to validating mouseInclusiveBounds for its subtree, as this
     * is what the hit-testing will use.
     *
     * NOTE: For the future, consider sharing more code with related functions. I tried this, and it made things look
     * more complicated (and probably slower), so I've kept some duplication. If a change is made to this function,
     * please check the other validate* methods to see if they also need a change.
     */
    private validateMouseExclusive;
    /**
     * Computes the touchInclusiveBounds for this picker (if dirty), and recursively validates it for all non-pruned
     * children.
     *
     * NOTE: For the future, consider sharing more code with related functions. I tried this, and it made things look
     * more complicated (and probably slower), so I've kept some duplication. If a change is made to this function,
     * please check the other validate* methods to see if they also need a change.
     */
    private validateTouchInclusive;
    /**
     * Computes the touchExclusiveBounds for this picker (if dirty), and recursively validates the touch-related bounds
     * for all non-pruned children.
     *
     * Notably, if a picker is selfInclusive, we will switch to validating touchInclusiveBounds for its subtree, as this
     * is what the hit-testing will use.
     *
     * NOTE: For the future, consider sharing more code with related functions. I tried this, and it made things look
     * more complicated (and probably slower), so I've kept some duplication. If a change is made to this function,
     * please check the other validate* methods to see if they also need a change.
     */
    private validateTouchExclusive;
    /**
     * Include pointer areas (if applicable), exclude bounds outside the clip area (if applicable), and transform
     * into the parent coordinate frame. Mutates the bounds provided.
     *
     * Meant to be called by the validation methods, as this part is the same for every validation that is done.
     *
     * @param mutableBounds - The bounds to be mutated (e.g. mouseExclusiveBounds).
     * @param pointerArea - A mouseArea/touchArea that should be included in the search.
     */
    private applyAreasAndTransform;
    /**
     * Called from Node when a child is inserted. (scenery-internal)
     *
     * NOTE: The child may not be fully added when this is called. Don't audit, or assume that calls to the Node would
     * indicate the parent-child relationship.
     *
     * @param childNode - Our picker node's new child node.
     */
    onInsertChild(childNode: Node): void;
    /**
     * Called from Node when a child is removed. (scenery-internal)
     *
     * NOTE: The child may not be fully removed when this is called. Don't audit, or assume that calls to the Node would
     * indicate the parent-child relationship.
     *
     * @param childNode - Our picker node's child that will be removed.
     */
    onRemoveChild(childNode: Node): void;
    /**
     * Called from Node when an input listener is added to our node. (scenery-internal)
     */
    onAddInputListener(): void;
    /**
     * Called from Node when an input listener is removed from our node. (scenery-internal)
     */
    onRemoveInputListener(): void;
    /**
     * Called when the 'pickable' value of our Node is changed. (scenery-internal)
     */
    onPickableChange(oldPickable: boolean | null, pickable: boolean | null): void;
    /**
     * Called when the visibility of our Node is changed. (scenery-internal)
     */
    onVisibilityChange(): void;
    /**
     * Called when the mouseArea of the Node is changed. (scenery-internal)
     */
    onMouseAreaChange(): void;
    /**
     * Called when the mouseArea of the Node is changed. (scenery-internal)
     */
    onTouchAreaChange(): void;
    /**
     * Called when the transform of the Node is changed. (scenery-internal)
     */
    onTransformChange(): void;
    /**
     * Called when the transform of the Node is changed. (scenery-internal)
     */
    onSelfBoundsDirty(): void;
    /**
     * Called when the transform of the Node is changed. (scenery-internal)
     */
    onClipAreaChange(): void;
    /**
     * Check to see if we are 'selfPruned', and update the value. If it changed, we'll need to notify our parents.
     *
     * Note that the prunability "pickable:false" or "invisible" won't affect our computed bounds, so we don't
     * invalidate ourself.
     */
    private checkSelfPruned;
    /**
     * Check to see if we are 'selfInclusive', and update the value. If it changed, we'll need to invalidate ourself.
     */
    private checkSelfInclusive;
    /**
     * Update our 'subtreePrunable' flag.
     */
    private checkSubtreePrunable;
    /**
     * Propagate the pickable count change down to our ancestors.
     *
     * @param n - The delta of how many pickable counts have been added/removed
     */
    private changePickableCount;
    /**
     * Returns whether our node is potentially pickable from its parents (i.e. whether it could be hit-tested and sent
     * input events, and thus whether its input listeners are relevant and could be interrupted).
     */
    isPotentiallyPickable(): boolean;
    /**
     * Runs a number of consistency tests when assertSlow is enabled. Verifies most conditions, and helps to catch
     * bugs earlier when they are initially triggered. (scenery-internal)
     */
    audit(): void;
}
//# sourceMappingURL=Picker.d.ts.map