export default Instance;
export type Display = any;
declare class Instance {
    /**
     * @mixes Poolable
     *
     * See initialize() for documentation
     *
     * @param {Display} display
     * @param {Trail} trail
     * @param {boolean} isDisplayRoot
     * @param {boolean} isSharedCanvasCacheRoot
     */
    constructor(display: Display, trail: Trail, isDisplayRoot: boolean, isSharedCanvasCacheRoot: boolean);
    /**
     * @public
     * @type {Display|null}
     */
    public display: Display | null;
    active: boolean;
    /**
     * @public
     *
     * @param {Display} display - Instances are bound to a single display
     * @param {Trail} trail - The list of ancestors going back up to our root instance (for the display, or for a cache)
     * @param {boolean} isDisplayRoot - Whether our instance is for the root node provided to the Display.
     * @param {boolean} isSharedCanvasCacheRoot - Whether our instance is the root for a shared Canvas cache (which can
     *                                            be used multiple places in the main instance tree)
     */
    public initialize(display: Display, trail: Trail, isDisplayRoot: boolean, isSharedCanvasCacheRoot: boolean): this;
    id: any;
    isWebGLSupported: any;
    relativeTransform: any;
    fittability: any;
    visible: boolean | undefined;
    relativeVisible: boolean | undefined;
    selfVisible: boolean | undefined;
    visibilityDirty: boolean | undefined;
    childVisibilityDirty: boolean | undefined;
    voicingVisible: boolean | undefined;
    branchIndexMap: any;
    branchIndexReferences: any;
    addRemoveCounter: number | undefined;
    stitchChangeFrame: any;
    stitchChangeBefore: number | undefined;
    stitchChangeAfter: number | undefined;
    stitchChangeOnChildren: any;
    stitchChangeIncluded: boolean | undefined;
    childInsertedListener: any;
    childRemovedListener: any;
    childrenReorderedListener: any;
    visibilityListener: any;
    markRenderStateDirtyListener: any;
    visibleEmitter: TinyEmitter<[]> | undefined;
    relativeVisibleEmitter: TinyEmitter<[]> | undefined;
    selfVisibleEmitter: TinyEmitter<[]> | undefined;
    canVoiceEmitter: TinyEmitter<[]> | undefined;
    externalReferenceCount: number | undefined;
    stateless: boolean | undefined;
    isDisplayRoot: boolean | undefined;
    isSharedCanvasCacheRoot: boolean | undefined;
    preferredRenderers: any;
    isUnderCanvasCache: any;
    isBackbone: boolean | undefined;
    isTransformed: boolean | undefined;
    isVisibilityApplied: boolean | undefined;
    isInstanceCanvasCache: boolean | undefined;
    isSharedCanvasCachePlaceholder: boolean | undefined;
    isSharedCanvasCacheSelf: boolean | undefined;
    selfRenderer: number | undefined;
    groupRenderer: number | undefined;
    sharedCacheRenderer: number | undefined;
    renderStateDirtyFrame: any;
    skipPruningFrame: any;
    /**
     * Called for initialization of properties (via initialize(), via constructor), and to clean the instance for
     * placement in the pool (don't leak memory).
     * @private
     *
     * If the parameters are null, we remove all external references so that we don't leak memory.
     *
     * @param {Display|null} display - Instances are bound to a single display
     * @param {Trail|null} trail - The list of ancestors going back up to our root instance (for the display, or for a cache)
     */
    private cleanInstance;
    trail: Trail | null | undefined;
    node: import("../imports.js").Node | null | undefined;
    parent: any;
    oldParent: any;
    children: any;
    sharedCacheInstance: any;
    instanceRemovalCheckList: any;
    selfDrawable: any;
    groupDrawable: any;
    sharedCacheDrawable: SharedCanvasCacheDrawable | null | undefined;
    firstDrawable: any;
    lastDrawable: any;
    firstInnerDrawable: any;
    lastInnerDrawable: any;
    svgGroups: any;
    /**
     * Initializes or clears properties that are all set as pseudo 'return values' of the syncTree() method. It is the
     * responsibility of the caller of syncTree() to afterwards (optionally read these results and) clear the references
     * using this method to prevent memory leaks.
     * @private
     *
     * TODO: consider a pool of (or a single global) typed return object(s), since setting these values on the instance https://github.com/phetsims/scenery/issues/1581
     * generally means hitting the heap, and can slow us down.
     */
    private cleanSyncTreeResults;
    beforeStableIndex: any;
    afterStableIndex: any;
    firstChangeInterval: any;
    lastChangeInterval: ChangeInterval | null | undefined;
    incompatibleStateChange: boolean | undefined;
    groupChanged: boolean | undefined;
    cascadingStateChange: boolean | undefined;
    anyStateChange: boolean | undefined;
    /**
     * Updates the rendering state properties, and returns a {boolean} flag of whether it was successful if we were
     * already stateful.
     * @private
     *
     * Rendering state properties determine how we construct the drawable tree from our instance tree (e.g. do we
     * create an SVG or Canvas rectangle, where to place CSS transforms, how to handle opacity, etc.)
     *
     * Instances start out as 'stateless' until updateRenderingState() is called the first time.
     *
     * Node changes that can cause a potential state change (using Node event listeners):
     * - hints
     * - opacity
     * - clipArea
     * - _rendererSummary
     * - _rendererBitmask
     *
     * State changes that can cause cascading state changes in descendants:
     * - isUnderCanvasCache
     * - preferredRenderers
     */
    private updateRenderingState;
    /**
     * A short string that contains a summary of the rendering state, for debugging/logging purposes.
     * @public
     *
     * @returns {string}
     */
    public getStateString(): string;
    /**
     * The main entry point for syncTree(), called on the root instance. See syncTree() for more information.
     * @public
     */
    public baseSyncTree(): void;
    /**
     * Updates the rendering state, synchronizes the instance sub-tree (so that our instance tree matches
     * the Node tree the client provided), and back-propagates {ChangeInterval} information for stitching backbones
     * and/or caches.
     * @private
     *
     * syncTree() also sets a number of pseudo 'return values' (documented in cleanSyncTreeResults()). After calling
     * syncTree() and optionally reading those results, cleanSyncTreeResults() should be called on the same instance
     * in order to prevent memory leaks.
     *
     * @returns {boolean} - Whether the sync was possible. If it wasn't, a new instance subtree will need to be created.
     */
    private syncTree;
    /**
     * Responsible for syncing children, connecting the drawable linked list as needed, and outputting change intervals
     * and first/last drawable information.
     * @private
     *
     * @param {boolean} selfChanged
     */
    private localSyncTree;
    /**
     * If necessary, create/replace/remove our selfDrawable.
     * @private
     *
     * @returns whether the selfDrawable changed
     */
    private updateSelfDrawable;
    /**
     * Returns the up-to-date instance.
     * @private
     *
     * @param {Instance} childInstance
     * @param {number} index
     * @returns {Instance}
     */
    private updateIncompatibleChildInstance;
    /**
     * @private
     *
     * @param {boolean} wasStateless
     */
    private groupSyncTree;
    /**
     * @private
     */
    private sharedSyncTree;
    /**
     * @private
     *
     * @param {boolean} wasStateless
     */
    private prepareChildInstances;
    /**
     * @private
     */
    private ensureSharedCacheInitialized;
    /**
     * Whether out drawables (from firstDrawable to lastDrawable) should be included in our parent's drawables
     * @private
     *
     * @returns {boolean}
     */
    private shouldIncludeInParentDrawables;
    /**
     * Finds the closest drawable (not including the child instance at childIndex) using lastDrawable, or null
     * @private
     *
     * TODO: check usage? https://github.com/phetsims/scenery/issues/1581
     *
     * @param {number} childIndex
     * @returns {Drawable|null}
     */
    private findPreviousDrawable;
    /**
     * Finds the closest drawable (not including the child instance at childIndex) using nextDrawable, or null
     * @private
     *
     * TODO: check usage? https://github.com/phetsims/scenery/issues/1581
     *
     * @param {number} childIndex
     * @returns {Drawable|null}
     */
    private findNextDrawable;
    /**
     * @private
     *
     * @param {Instance} instance
     */
    private appendInstance;
    /**
     * @private
     *
     * NOTE: different parameter order compared to Node
     *
     * @param {Instance} instance
     * @param {number} index
     */
    private insertInstance;
    /**
     * @private
     *
     * @param {Instance} instance
     */
    private removeInstance;
    /**
     * @private
     *
     * @param {Instance} instance
     * @param {number} index
     */
    private removeInstanceWithIndex;
    /**
     * @private
     *
     * @param {Instance} childInstance
     * @param {Instance} replacementInstance
     * @param {number} index
     */
    private replaceInstanceWithIndex;
    /**
     * For handling potential reordering of child instances inclusively between the min and max indices.
     * @private
     *
     * @param {number} minChangeIndex
     * @param {number} maxChangeIndex
     */
    private reorderInstances;
    /**
     * If we have a child instance that corresponds to this node, return it (otherwise null).
     * @private
     *
     * @param {Node} node
     * @returns {Instance|null}
     */
    private findChildInstanceOnNode;
    /**
     * Event callback for Node's 'childInserted' event, used to track children.
     * @private
     *
     * @param {Node} childNode
     * @param {number} index
     */
    private onChildInserted;
    /**
     * Event callback for Node's 'childRemoved' event, used to track children.
     * @private
     *
     * @param {Node} childNode
     * @param {number} index
     */
    private onChildRemoved;
    /**
     * Event callback for Node's 'childrenReordered' event
     * @private
     *
     * @param {number} minChangeIndex
     * @param {number} maxChangeIndex
     */
    private onChildrenReordered;
    /**
     * Event callback for Node's 'visibility' event, used to notify about stitch changes.
     * @private
     */
    private onVisibilityChange;
    /**
     * Event callback for Node's 'opacity' change event.
     * @private
     */
    private onOpacityChange;
    /**
     * @private
     */
    private markChildVisibilityDirty;
    /**
     * Updates the currently fittability for all of the drawables attached to this instance.
     * @public
     *
     * @param {boolean} fittable
     */
    public updateDrawableFittability(fittable: boolean): void;
    /**
     * Updates the visible/relativeVisible flags on the Instance and its entire subtree.
     * @public
     *
     * @param {boolean} parentGloballyVisible - Whether our parent (if any) is globally visible
     * @param {boolean} parentGloballyVoicingVisible - Whether our parent (if any) is globally voicingVisible.
     * @param {boolean} parentRelativelyVisible - Whether our parent (if any) is relatively visible
     * @param {boolean} updateFullSubtree - If true, we will visit the entire subtree to ensure visibility is correct.
     */
    public updateVisibility(parentGloballyVisible: boolean, parentGloballyVoicingVisible: boolean, parentRelativelyVisible: boolean, updateFullSubtree: boolean): void;
    /**
     * @private
     *
     * @returns {number}
     */
    private getDescendantCount;
    /**
     * Add a reference for an SVG group (fastest way to track them)
     * @public
     *
     * @param {SVGGroup} group
     */
    public addSVGGroup(group: SVGGroup): void;
    /**
     * Remove a reference for an SVG group (fastest way to track them)
     * @public
     *
     * @param {SVGGroup} group
     */
    public removeSVGGroup(group: SVGGroup): void;
    /**
     * Returns null when a lookup fails (which is legitimate)
     * @public
     *
     * @param {SVGBlock} block
     * @returns {SVGGroup|null}
     */
    public lookupSVGGroup(block: SVGBlock): SVGGroup | null;
    /**
     * What instance have filters (opacity/visibility/clip) been applied up to?
     * @public
     *
     * @returns {Instance}
     */
    public getFilterRootInstance(): Instance;
    /**
     * What instance transforms have been applied up to?
     * @public
     *
     * @returns {Instance}
     */
    public getTransformRootInstance(): Instance;
    /**
     * @public
     *
     * @returns {Instance}
     */
    public getVisibilityRootInstance(): Instance;
    /**
     * @private
     */
    private attachNodeListeners;
    /**
     * @private
     */
    private detachNodeListeners;
    /**
     * Ensure that the render state is updated in the next syncTree()
     * @private
     */
    private markRenderStateDirty;
    /**
     * Ensure that this instance and its children will be visited in the next syncTree()
     * @private
     */
    private markSkipPruning;
    /**
     * @public
     *
     * NOTE: used in CanvasBlock internals, performance-critical.
     *
     * @param {Instance} instance
     * @returns {number}
     */
    public getBranchIndexTo(instance: Instance): number;
    /**
     * Clean up listeners and garbage, so that we can be recycled (or pooled)
     * @public
     */
    public dispose(): void;
    /**
     * @public
     *
     * @param {number} frameId
     * @param {boolean} allowValidationNotNeededChecks
     */
    public audit(frameId: number, allowValidationNotNeededChecks: boolean): void;
    /**
     * Applies checks to make sure our visibility tracking is working as expected.
     * @public
     *
     * @param {boolean} parentVisible
     */
    public auditVisibility(parentVisible: boolean): void;
    /**
     * @private
     *
     * @param {Drawable|null} oldFirstDrawable
     * @param {Drawable|null} oldLastDrawable
     * @param {Drawable|null} newFirstDrawable
     * @param {Drawable|null} newLastDrawable
     */
    private auditChangeIntervals;
    /**
     * Returns a string form of this object
     * @public
     *
     * @returns {string}
     */
    public toString(): string;
}
import { Trail } from '../imports.js';
import TinyEmitter from '../../../axon/js/TinyEmitter.js';
import { SharedCanvasCacheDrawable } from '../imports.js';
import { ChangeInterval } from '../imports.js';
//# sourceMappingURL=Instance.d.ts.map