import '../../../../assert/js/assert.js';
import '../../../../globals.js';
import Disposable from '../../../../axon/js/Disposable.js';
import TProperty from '../../../../axon/js/TProperty.js';
import Matrix3 from '../../../../dot/js/Matrix3.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import { KeyboardDragListener, Node, NodeOptions, ParallelDOMOptions, PDOMValueType, TInputListener } from '../../../../scenery/js/imports.js';
import GrabReleaseCueNode from '../nodes/GrabReleaseCueNode.js';
import { GrabDragModelOptions } from './GrabDragModel.js';
import GrabDragUsageTracker from './GrabDragUsageTracker.js';
export type CuePosition = 'center' | 'top' | 'bottom' | 'left' | 'right';
type SelfOptions = {
    objectToGrabString?: PDOMValueType;
    idleStateAccessibleName?: PDOMValueType | null;
    onGrab?: VoidFunction;
    onRelease?: VoidFunction;
    idleStateOptions?: ParallelDOMOptions;
    grabCueOptions?: NodeOptions;
    grabCuePosition?: CuePosition;
    dragCuePosition?: CuePosition;
    grabCueOffset?: Vector2;
    dragCueOffset?: Vector2;
    transformNodeToTrack?: Node;
    grabbedStateOptions?: NodeOptions;
    dragCueNode?: Node;
    listenersWhileGrabbed?: TInputListener[];
    listenersWhileIdle?: TInputListener[];
    supportsGestureDescription?: boolean;
    shouldAddAriaDescribedby?: () => boolean;
    keyboardHelpText?: PDOMValueType | null;
    shouldShowGrabCueNode?: () => boolean;
    shouldShowDragCueNode?: () => boolean;
    gestureHelpText?: PDOMValueType | null;
    grabDragUsageTracker?: GrabDragUsageTracker;
};
type GrabDragInteractionOptions = SelfOptions & GrabDragModelOptions;
export default class GrabDragInteraction extends Disposable {
    private _grabbedStateAccessibleName;
    private _idleStateAccessibleName;
    private _onGrab;
    private _onRelease;
    private _keyboardHelpText;
    private _gestureHelpText;
    private readonly node;
    private readonly idleStateOptions;
    private readonly grabbedStateOptions;
    private readonly dragCueNode;
    readonly grabCueNode: GrabReleaseCueNode;
    private readonly shouldShowGrabCueNode;
    private readonly shouldShowDragCueNode;
    private readonly shouldAddAriaDescribedby;
    private readonly supportsGestureDescription;
    private readonly listenersWhileIdle;
    private readonly listenersWhileGrabbed;
    private readonly grabDragModel;
    private readonly descriptionAssociationObject;
    private readonly onGrabButtonFocusEmitter;
    private readonly grabDragFocusHighlight;
    private readonly grabDragInteractiveHighlight;
    private readonly pressReleaseListener;
    private readonly matrixBetweenProperty;
    private readonly grabCuePosition;
    private readonly dragCuePosition;
    private readonly grabCueOffset;
    private readonly dragCueOffset;
    /**
     * @param node - will be mutated with a11y options to have the grab/drag functionality in the PDOM
     * @param keyboardDragListener - added to the Node when it is grabbed
     * @param interactionCueParent - a parent Node for the grabCueNode and dragCueNode
     * @param providedOptions
     */
    constructor(node: Node, keyboardDragListener: KeyboardDragListener, interactionCueParent: Node, providedOptions?: GrabDragInteractionOptions);
    /**
     * Sets the name to be used when in the "grabbed" state. If already grabbed, the name is set to the target Node right away.
     */
    setGrabbedStateAccessibleName(name: PDOMValueType): void;
    set grabbedStateAccessibleName(name: PDOMValueType);
    /**
     * Sets the name to be used when in the "idle" state. If already idle, the name is set to the target Node right away.
     * @param name
     */
    setIdleStateAccessibleName(name: PDOMValueType): void;
    set idleStateAccessibleName(name: PDOMValueType);
    /**
     * Set the help text for keboard input. If the runtime supports "gesture description" this is a no-op.
     */
    setKeyboardHelpText(text: PDOMValueType): void;
    getKeyboardHelpText(): PDOMValueType;
    set keyboardHelpText(text: PDOMValueType);
    get keyboardHelpText(): PDOMValueType;
    /**
     * Set the help text for gesture input. If the runtime does not support "gesture description" this is a no-op.
     */
    setGestureHelpText(text: PDOMValueType): void;
    getGestureHelpText(): PDOMValueType;
    set gestureHelpText(text: PDOMValueType);
    get gestureHelpText(): PDOMValueType;
    /**
     * Set the callback that should be used when grabbed - called when switching from idle to grabbed state.
     */
    setOnGrab(onGrab: VoidFunction): void;
    getOnGrab(): VoidFunction;
    set onGrab(onGrab: VoidFunction);
    get onGrab(): VoidFunction;
    /**
     * Set the callback that should be used when released - called when switching from grabbed to idle state.
     */
    setOnRelease(onRelease: VoidFunction): void;
    getOnRelease(): VoidFunction;
    set onRelease(onRelease: VoidFunction);
    get onRelease(): VoidFunction;
    /**
     * Set the positions of the grabCueNode and dragCueNode relative to the target Node. The position is determined by
     * the CuePosition and the offsets.
     */
    repositionCues(matrix: Matrix3 | null): void;
    /**
     * Sets the position of the cueNode relative to the bounds in the parent coordinate frame, from
     * the provided position type and offsets.
     *
     * @param matrix - the transformation matrix from the local frame of the target Node to the local frame of the interactionCueParent
     * @param cueNode - the Node to position
     * @param position - the position of the cueNode relative to the bounds
     * @param offset - the offset of the cueNode relative to the position
     */
    private positionCueNode;
    /**
     * Update the node to switch modalities between being grabbed, and idle. This function holds code that should
     * be called when switching from any state to any other state.
     */
    private updateFromState;
    private updateAriaDescribedby;
    /**
     * Update the focusHighlights according to if we are in idle or grabbed state
     * No need to set visibility to true, because that will happen for us by HighlightOverlay on focus.
     */
    private updateFocusHighlights;
    /**
     * Update the visibility of the cues for both idle and grabbed states.
     */
    private updateVisibilityForCues;
    /**
     * Add all listeners to node
     */
    private addInputListeners;
    /**
     * Remove all listeners from the node. Called from dispose, so it is nice to be graceful.
     */
    private removeInputListeners;
    /**
     * Interrupt the grab drag interraction - interrupts any listeners attached and makes sure the
     * Node is back in its "idle" state.
     */
    interrupt(): void;
    /**
     * Often onGrab callbacks need to know whether the grab was triggered from keyboard/pdom, in which case it should
     * trigger description, OR triggered via mouse/touch which may not trigger description because another listener may
     * be responsible.
     */
    isInputFromMouseOrTouch(): boolean;
    private wireUpDescriptionAndVoicingResponses;
    /**
     * Reset to initial state
     */
    reset(): void;
    get enabledProperty(): TProperty<boolean>;
    get enabled(): boolean;
    set enabled(enabled: boolean);
}
export {};
//# sourceMappingURL=GrabDragInteraction.d.ts.map