import '../../../assert/js/assert.js';
import '../../../tandem/js/PhetioIDUtils.js';
import '../../../globals.js';
import TProperty from '../../../axon/js/TProperty.js';
import Vector2 from '../../../dot/js/Vector2.js';
import Enumeration from '../../../phet-core/js/Enumeration.js';
import EnumerationValue from '../../../phet-core/js/EnumerationValue.js';
import IOType from '../../../tandem/js/types/IOType.js';
import { EventContext, TInputListener, Trail } from '../imports.js';
import TAttachableInputListener from './TAttachableInputListener.js';
export declare class Intent extends EnumerationValue {
    static readonly DRAG: Intent;
    static readonly KEYBOARD_DRAG: Intent;
    static readonly enumeration: Enumeration<Intent>;
}
type PointerType = 'pdom' | 'touch' | 'mouse' | 'pen';
export type ActivePointer = {
    point: Vector2;
} & Pointer;
export default abstract class Pointer {
    point: Vector2;
    readonly type: PointerType;
    trail: Trail | null;
    inputEnabledTrail: Trail | null;
    isDownProperty: TProperty<boolean>;
    attachedProperty: TProperty<boolean>;
    private readonly _listeners;
    private _attachedListener;
    private _cursor;
    lastEventContext: EventContext | null;
    private _intents;
    private _pointerCaptured;
    private _listenerForDragReserve;
    private _listenerForKeyboardDragReserve;
    static readonly PointerIO: IOType<Pointer, any, any>;
    /**
     * @param initialPoint
     * @param type - the type of the pointer; can different for each subtype
     */
    protected constructor(initialPoint: Vector2, type: PointerType);
    /**
     * Sets a cursor that takes precedence over cursor values specified on the pointer's trail.
     *
     * Typically this can be set when a drag starts (and returned to null when the drag ends), so that the cursor won't
     * change while dragging (regardless of what is actually under the pointer). This generally will only apply to the
     * Mouse subtype of Pointer.
     *
     * NOTE: Consider setting this only for attached listeners in the future (or have a cursor field on pointers).
     */
    setCursor(cursor: string | null): this;
    set cursor(value: string | null);
    get cursor(): string | null;
    /**
     * Returns the current cursor override (or null if there is one). See setCursor().
     */
    getCursor(): string | null;
    /**
     * Returns a defensive copy of all listeners attached to this pointer. (scenery-internal)
     */
    getListeners(): TInputListener[];
    get listeners(): TInputListener[];
    /**
     * Adds an input listener to this pointer. If the attach flag is true, then it will be set as the "attached"
     * listener.
     */
    addInputListener(listener: TInputListener, attach?: boolean): void;
    /**
     * Removes an input listener from this pointer.
     */
    removeInputListener(listener: TInputListener): void;
    /**
     * Returns the listener attached to this pointer with attach(), or null if there isn't one.
     */
    getAttachedListener(): TAttachableInputListener | null;
    get attachedListener(): TAttachableInputListener | null;
    /**
     * Returns whether this pointer has an attached (primary) listener.
     */
    isAttached(): boolean;
    /**
     * Some pointers are treated differently because they behave like a touch. This is not exclusive to `Touch and touch
     * events though. See https://github.com/phetsims/scenery/issues/1156
     */
    isTouchLike(): boolean;
    /**
     * Sets whether this pointer is down/pressed, or up.
     *
     * NOTE: Naming convention is for legacy code, would usually have pointer.down
     * TODO: improve name, .setDown( value ) with .down = https://github.com/phetsims/scenery/issues/1581
     */
    set isDown(value: boolean);
    /**
     * Returns whether this pointer is down/pressed, or up.
     *
     * NOTE: Naming convention is for legacy code, would usually have pointer.down
     * TODO: improve name, .isDown() with .down https://github.com/phetsims/scenery/issues/1581
     */
    get isDown(): boolean;
    /**
     * If there is an attached listener, interrupt it.
     *
     * After this executes, this pointer should not be attached.
     */
    interruptAttached(): void;
    /**
     * Interrupts all listeners on this pointer.
     */
    interruptAll(): void;
    /**
     * Marks the pointer as attached to this listener.
     */
    private attach;
    /**
     * @returns - Whether the point changed
     */
    updatePoint(point: Vector2, eventName?: string): boolean;
    /**
     * Sets information in this Pointer for a given pointer down. (scenery-internal)
     *
     @returns - Whether the point changed
     */
    down(event: Event): void;
    /**
     * Sets information in this Pointer for a given pointer up. (scenery-internal)
     *
     * @returns - Whether the point changed
     */
    up(point: Vector2, event: Event): boolean;
    /**
     * Sets information in this Pointer for a given pointer cancel. (scenery-internal)
     *
     * @returns - Whether the point changed
     */
    cancel(point: Vector2): boolean;
    /**
     * Marks the pointer as detached from a previously attached listener.
     */
    private detach;
    /**
     * Determines whether the point of the pointer has changed (used in mouse/touch/pen).
     */
    protected hasPointChanged(point: Vector2): boolean;
    /**
     * Adds an Intent Pointer. By setting Intent, other listeners in the dispatch phase can react accordingly.
     * Note that the Intent can be changed by listeners up the dispatch phase or on the next press. See Intent enum
     * for valid entries.
     */
    addIntent(intent: Intent): void;
    /**
     * Remove an Intent from the Pointer. See addIntent for more information.
     */
    removeIntent(intent: Intent): void;
    /**
     * Returns whether or not this Pointer has been assigned the provided Intent.
     */
    hasIntent(intent: Intent): boolean;
    /**
     * Set the intent of this Pointer to indicate that it will be used for mouse/touch style dragging, indicating to
     * other listeners in the dispatch phase that behavior may need to change. Adds a listener to the pointer (with
     * self removal) that clears the intent when the pointer receives an "up" event. Should generally be called on
     * the Pointer in response to a down event.
     */
    reserveForDrag(): void;
    /**
     * Set the intent of this Pointer to indicate that it will be used for keyboard style dragging, indicating to
     * other listeners in the dispatch that behavior may need to change. Adds a listener to the pointer (with self
     * removal) that clears the intent when the pointer receives a "keyup" or "blur" event. Should generally be called
     * on the Pointer in response to a keydown event.
     */
    reserveForKeyboardDrag(): void;
    /**
     * This is called when a capture starts on this pointer. We request it on pointerstart, and if received, we should
     * generally receive events outside the window.
     */
    onGotPointerCapture(): void;
    /**
     * This is called when a capture ends on this pointer. This happens normally when the user releases the pointer above
     * the sim or outside, but also in cases where we have NOT received an up/end.
     *
     * See https://github.com/phetsims/scenery/issues/1186 for more information. We'll want to interrupt the pointer
     * on this case regardless,
     */
    onLostPointerCapture(): void;
    /**
     * Releases references so it can be garbage collected.
     */
    dispose(): void;
    toString(): string;
}
export {};
//# sourceMappingURL=Pointer.d.ts.map