import '../../../assert/js/assert.js';
import '../../../globals.js';
import TProperty from '../../../axon/js/TProperty.js';
import TReadOnlyProperty from '../../../axon/js/TReadOnlyProperty.js';
import Range from '../../../dot/js/Range.js';
import Orientation from '../../../phet-core/js/Orientation.js';
import Constructor from '../../../phet-core/js/types/Constructor.js';
import IntentionalAny from '../../../phet-core/js/types/IntentionalAny.js';
import { Node, PDOMValueType, SceneryEvent, SceneryListenerFunction, TInputListener, TVoicing, VoicingOptions } from '../../../scenery/js/imports.js';
type OnInputFunction = (event: SceneryEvent, oldValue: number) => void;
type CreateTextFunction = {
    /**
     * @param pdomMappedValue - see
     * @param newValue - the new value, unformatted
     * @param valueOnStart - the value at the start of the interaction, the value on keydown for press and hold
     * @returns - text/response/string to be set to the primarySibling, null means nothing will happen
     * */
    (pdomMappedValue: number, newValue: number, valueOnStart: number | null): PDOMValueType | null;
    reset?: () => void;
};
export type VoicingOnEndResponseOptions = {
    onlyOnValueChange?: boolean;
    withNameResponse?: boolean;
    withObjectResponse?: boolean;
};
export type VoicingOnEndResponse = (valueOnStart: number, providedOptions?: VoicingOnEndResponseOptions) => void;
type SelfOptions = {
    valueProperty: TProperty<number>;
    enabledRangeProperty: TReadOnlyProperty<Range>;
    startInput?: (event: SceneryEvent) => void;
    endInput?: (event: SceneryEvent | null) => void;
    onInput?: OnInputFunction;
    constrainValue?: (value: number) => number;
    keyboardStep?: number;
    shiftKeyboardStep?: number;
    pageKeyboardStep?: number;
    reverseAlternativeInput?: boolean;
    ariaOrientation?: Orientation;
    panTargetNode?: null | Node;
    roundToStepSize?: boolean;
    /**
     * Map the valueProperty value to another number that will be read by assistive devices on
     * valueProperty changes from the PDOM values. This is used to set the values for aria-valuetext and the on
     * change alert, as well as the following attributes on the PDOM input:
     *    value
     *    aria-valuenow
     *    min
     *    max
     *    step
     *
     * For this reason, it is important that the mapped "min" would not be bigger than the mapped "max" from the
     * enabledRangeProperty.
     *
     * This map is used to control attributes in the PDOM (not the valueProperty).
     */
    pdomMapPDOMValue?: (value: number) => number;
    /**
     * Called before constraining and setting the Property. This is useful in rare cases where the value being set
     * by AccessibleValueHandler may change based on outside logic. This is for mapping value changes from input listeners
     * assigned in this type (keyboard/alt-input) to a new value before the value is set.
     *
     * This map is used to control the actual valueProperty.
     */
    pdomMapValue?: (newValue: number, previousValue: number) => number;
    /**
     * If true, the aria-valuetext will be spoken every value change, even if the aria-valuetext doesn't
     * actually change. By default, screen readers won't speak aria-valuetext if it remains the same for
     * multiple values.
     */
    pdomRepeatEqualValueText?: boolean;
    /**
     * aria-valuetext creation function, called when the valueProperty changes.
     * This string is read by AT every time the slider value changes. This is often called the "object response"
     * for this interaction.
     */
    pdomCreateAriaValueText?: CreateTextFunction;
    /**
     * Create content for an alert that will be sent to the utteranceQueue when the user finishes interacting
     * with the input. Is not generated every change, but on every "drag" interaction, this is called with
     * endInput. With a keyboard, this will be called even with no value change (on the key up event ending the
     * interaction), On a touch system like iOS with Voice Over however, input and change events will only fire
     * when there is a Property value change, so "edge" alerts will not fire, see https://github.com/phetsims/gravity-force-lab-basics/issues/185.
     * This alert is often called the "context response" because it is timed to only alert after an interaction
     * end, instead of each time the value changes.
     *
     * If function returns null, then no alert will be sent to utteranceQueue for alerting.
     *
     * This function can also support a `reset` function on it, to be called when the AccessibleValueHandler is reset
     */
    pdomCreateContextResponseAlert?: CreateTextFunction | null;
    contextResponsePerValueChangeDelay?: number;
    contextResponseMaxDelay?: number;
    /**
     * List the dependencies this Node's PDOM descriptions have. This should not include the valueProperty, but
     * should list any Properties whose change should trigger a description update for this Node.
     */
    pdomDependencies?: TReadOnlyProperty<IntentionalAny>[];
    tagName?: null;
    voicingOnEndResponseOptions?: VoicingOnEndResponseOptions;
};
export type AccessibleValueHandlerOptions = SelfOptions & VoicingOptions;
export type TAccessibleValueHandler = {
    startInput: SceneryListenerFunction;
    onInput: OnInputFunction;
    endInput: (event: SceneryEvent | null) => void;
    constrainValue: ((value: number) => number);
    panTargetNode: Node | null;
    roundToStepSize: boolean;
    pdomMapPDOMValue: ((value: number) => number);
    pdomMapValue: ((newValue: number, previousValue: number) => number);
    pdomRepeatEqualValueText: boolean;
    pdomCreateAriaValueText: CreateTextFunction;
    pdomCreateContextResponseAlert: CreateTextFunction | null;
    contextResponsePerValueChangeDelay: number;
    contextResponseMaxDelay: number;
    voicingOnEndResponseOptions: VoicingOnEndResponseOptions;
    setPDOMDependencies(dependencies: TReadOnlyProperty<IntentionalAny>[]): void;
    getPDOMDependencies(): TReadOnlyProperty<IntentionalAny>[];
    pdomDependencies: TReadOnlyProperty<IntentionalAny>[];
    alertContextResponse(): void;
    reset(): void;
    getAccessibleValueHandlerInputListener(): TInputListener;
    handleKeyDown(event: SceneryEvent<KeyboardEvent>): void;
    handleKeyUp(event: SceneryEvent<KeyboardEvent>): void;
    handleChange(event: SceneryEvent): void;
    handleInput(event: SceneryEvent): void;
    handleBlur(event: SceneryEvent<FocusEvent>): void;
    setKeyboardStep(keyboardStep: number): void;
    keyboardStep: number;
    getKeyboardStep(): number;
    setShiftKeyboardStep(shiftKeyboardStep: number): void;
    shiftKeyboardStep: number;
    getShiftKeyboardStep(): number;
    getShiftKeyDown(): boolean;
    get shiftKeyDown(): boolean;
    setPageKeyboardStep(pageKeyboardStep: number): void;
    pageKeyboardStep: number;
    getPageKeyboardStep(): number;
    setAriaOrientation(orientation: Orientation): void;
    ariaOrientation: Orientation;
    getAriaOrientation(): Orientation;
    voicingOnEndResponse(valueOnStart: number, providedOptions?: VoicingOnEndResponseOptions): void;
} & TVoicing;
/**
 * @param Type
 * @param optionsArgPosition - zero-indexed number that the options argument is provided at
 */
declare const AccessibleValueHandler: {
    <SuperType extends Constructor<Node>>(Type: SuperType, optionsArgPosition: number): SuperType & Constructor<TAccessibleValueHandler>;
    DEFAULT_TAG_NAME: string;
};
export default AccessibleValueHandler;
//# sourceMappingURL=AccessibleValueHandler.d.ts.map