import '../../assert/js/assert.js';
import '../../tandem/js/PhetioIDUtils.js';
import '../../globals.js';
import IntentionalAny from '../../phet-core/js/types/IntentionalAny.js';
import PropertyStatePhase from './PropertyStatePhase.js';
import ReadOnlyProperty from './ReadOnlyProperty.js';
import { TPhetioStateEngine } from '../../tandem/js/TPhetioStateEngine.js';
declare class PropertyStateHandler {
    private readonly phaseCallbackSets;
    private readonly undeferBeforeUndeferMapPair;
    private readonly undeferBeforeNotifyMapPair;
    private readonly notifyBeforeUndeferMapPair;
    private readonly notifyBeforeNotifyMapPair;
    private readonly mapPairs;
    private initialized;
    constructor();
    initialize(phetioStateEngine: TPhetioStateEngine): void;
    private static validateInstrumentedProperty;
    private validatePropertyPhasePair;
    /**
     * Get the MapPair associated with the proved PropertyStatePhases
     */
    private getMapPairFromPhases;
    /**
     * Register that one Property must have a "Phase" applied for PhET-iO state before another Property's Phase. A Phase
     * is an ending state in PhET-iO state set where Property values solidify, notifications for value changes are called.
     * The PhET-iO state engine will always undefer a Property before it notifies its listeners. This is for registering
     * two different Properties.
     *
     * @param beforeProperty - the Property that needs to be set before the second; must be instrumented for PhET-iO
     * @param beforePhase
     * @param afterProperty - must be instrumented for PhET-iO
     * @param afterPhase
     */
    registerPhetioOrderDependency(beforeProperty: ReadOnlyProperty<IntentionalAny>, beforePhase: PropertyStatePhase, afterProperty: ReadOnlyProperty<IntentionalAny>, afterPhase: PropertyStatePhase): void;
    /**
     * {Property} property - must be instrumented for PhET-iO
     * {boolean} - true if Property is in any order dependency
     */
    private propertyInAnOrderDependency;
    /**
     * Unregisters all order dependencies for the given Property
     * {ReadOnlyProperty} property - must be instrumented for PhET-iO
     */
    unregisterOrderDependenciesForProperty(property: ReadOnlyProperty<IntentionalAny>): void;
    /**
     * Given registered Property Phase order dependencies, undefer all AXON/Property PhET-iO Elements to take their
     * correct values and have each notify their listeners.
     * {Set.<string>} phetioIDsInState - set of phetioIDs that were set in state
     */
    private undeferAndNotifyProperties;
    private errorInUndeferAndNotifyStep;
    /**
     * Only for Testing!
     * Get the number of order dependencies registered in this class
     *
     */
    getNumberOfOrderDependencies(): number;
    /**
     * Go through all phases still to be applied, and apply them if the order dependencies allow it. Only apply for the
     * particular phase provided. In general UNDEFER must occur before the same phetioID gets NOTIFY.
     *
     * @param phase - only apply PhaseCallbacks for this particular PropertyStatePhase
     * @param completedPhases - map that keeps track of completed phases
     * @param phetioIDsInState - set of phetioIDs that were set in state
     */
    private attemptToApplyPhases;
    /**
     * @param phetioID - think of this as the "afterPhetioID" since there may be some phases that need to be applied before it has this phase done.
     * @param phase
     * @param completedPhases - map that keeps track of completed phases
     * @param phetioIDsInState - set of phetioIDs that were set in state
     * @param - if the provided phase can be applied given the dependency order dependencies of the state engine.
     */
    private phetioIDCanApplyPhase;
}
export default PropertyStateHandler;
/**
 * Singleton responsible for AXON/Property specific state logic. Use this global for the project to have a single
 * place to tap into the PhetioStateEngine, as well as a single point to register any order dependencies that Properties
 * have between each other when setting their state and applying their values/notifying.
 */
export declare const propertyStateHandlerSingleton: PropertyStateHandler;
//# sourceMappingURL=PropertyStateHandler.d.ts.map