import '../../assert/js/assert.js';
import '../../tandem/js/PhetioIDUtils.js';
import '../../globals.js';
import TinyProperty, { TinyPropertyOnBeforeNotify } from './TinyProperty.js';
import TProperty from './TProperty.js';
import TReadOnlyProperty, { PropertyLazyLinkListener } from './TReadOnlyProperty.js';
type NodeLike = {
    updateLinkedElementForProperty: <ValueType>(tandemName: string, oldProperty?: TReadOnlyProperty<ValueType> | null, newProperty?: TReadOnlyProperty<ValueType> | null) => void;
    isPhetioInstrumented: () => boolean;
};
type OrNull<Type> = Type | null;
export default class TinyForwardingProperty<ValueType> extends TinyProperty<ValueType> {
    private targetProperty?;
    protected forwardingListener?: PropertyLazyLinkListener<ValueType>;
    private ownedPhetioProperty?;
    private targetPropertyInstrumented?;
    private phetioInitialized?;
    /**
     * @param value
     * @param [targetPropertyInstrumented] - For phet-io support only, set to false if the target Property is not instrumented
     * @param [onBeforeNotify]
     */
    constructor(value: ValueType, targetPropertyInstrumented?: boolean, onBeforeNotify?: TinyPropertyOnBeforeNotify<ValueType>);
    setValueOrTargetProperty<NodeType extends NodeLike, NodeParam extends OrNull<NodeType>>(node: NodeParam, tandemName: string | null, newValueOrTargetProperty: TReadOnlyProperty<ValueType> | ValueType): void;
    /**
     * Sets (or unsets if `null` is provided) the Property that we use for forwarding changes.
     *
     * @param newTargetProperty - null to "unset" forwarding.
     * @param node - (For phet-io support only):
     *               The container of TinyForwardingProperty which supports updateLinkedElementForProperty()
     * @param tandemName - null if the Property does not support PhET-iO instrumentation
     * @returns the passed in Node, for chaining.
     */
    setTargetProperty<NodeType extends NodeLike, NodeParam extends OrNull<NodeType>>(newTargetProperty: TReadOnlyProperty<ValueType> | null, node?: NodeParam, tandemName?: string | null): NodeParam;
    private clearTargetProperty;
    /**
     * Notify this Property's listeners when the targetProperty changes.
     * For performance, keep this listener on the prototype.
     */
    private onTargetPropertyChange;
    /**
     * Sets the value and notifies listeners, unless deferred or disposed. You can also use the es5 getter
     * (property.value) but this means is provided for inner loops or internal code that must be fast. If the value
     * hasn't changed, this is a no-op.
     */
    set(value: ValueType): this;
    /**
     * Use this to automatically create a forwarded, PhET-iO instrumented Property owned by this TinyForwardingProperty.
     */
    setTargetPropertyInstrumented<NodeType extends NodeLike>(targetPropertyInstrumented: boolean, node: NodeType): NodeType;
    getTargetPropertyInstrumented(): boolean;
    /**
     * @param node - the parent container that supports updateLinkedElementForProperty()
     * @param tandemName
     * @param createProperty - creates an "owned" Property
     */
    initializePhetio(node: NodeLike, tandemName: string, createProperty: () => TProperty<ValueType>): void;
    /**
     * Get the target property, if any. Use sparingly! Internal use only.
     */
    getTargetProperty(): TReadOnlyProperty<ValueType> | null;
    /**
     * This currently also involves deleting the field.
     */
    private disposeOwnedPhetioProperty;
    dispose(): void;
}
export {};
//# sourceMappingURL=TinyForwardingProperty.d.ts.map