import '../../../../assert/js/assert.js';
import '../../../../globals.js';
/**
 * A trait for Node that supports the Voicing feature, under accessibility. Allows you to define responses for the Node
 * and make requests to speak that content using HTML5 SpeechSynthesis and the UtteranceQueue. Voicing content is
 * organized into four categories which are responsible for describing different things. Responses are stored on the
 * composed type: "ResponsePacket." See that file for details about what responses it stores. Output of this content
 * can be controlled by the responseCollector. Responses are defined as the following. . .
 *
 * - "Name" response: The name of the object that uses Voicing. Similar to the "Accessible Name" in web accessibility.
 * - "Object" response: The state information about the object that uses Voicing.
 * - "Context" response: The contextual changes that result from interaction with the Node that uses Voicing.
 * - "Hint" response: A supporting hint that guides the user toward a desired interaction with this Node.
 *
 * See ResponsePacket, as well as the property and setter documentation for each of these responses for more
 * information.
 *
 * Once this content is set, you can make a request to speak it using an UtteranceQueue with one of the provided
 * functions in this Trait. It is up to you to call one of these functions when you wish for speech to be made. The only
 * exception is on the 'focus' event. Every Node that composes Voicing will speak its responses by when it
 * receives focus.
 *
 * @author Jesse Greenberg (PhET Interactive Simulations)
 * @author Michael Kauzmann (PhET Interactive Simulations)
 */
import TinyProperty from '../../../../axon/js/TinyProperty.js';
import Constructor from '../../../../phet-core/js/types/Constructor.js';
import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js';
import ResponsePacket, { ResolvedResponse, SpeakableResolvedOptions, VoicingResponse } from '../../../../utterance-queue/js/ResponsePacket.js';
import ResponsePatternCollection from '../../../../utterance-queue/js/ResponsePatternCollection.js';
import Utterance, { TAlertable } from '../../../../utterance-queue/js/Utterance.js';
import { InteractiveHighlightingOptions, Node, SceneryListenerFunction } from '../../imports.js';
import type { TInteractiveHighlighting } from './InteractiveHighlighting.js';
type SelfOptions = {
    voicingNameResponse?: VoicingResponse;
    voicingObjectResponse?: VoicingResponse;
    voicingContextResponse?: VoicingResponse;
    voicingHintResponse?: VoicingResponse;
    voicingResponsePatternCollection?: ResponsePatternCollection;
    voicingIgnoreVoicingManagerProperties?: boolean;
    voicingFocusListener?: SceneryListenerFunction<FocusEvent> | null;
    voicingUtterance?: Utterance | null;
};
export type VoicingOptions = SelfOptions & InteractiveHighlightingOptions;
export type SpeakingOptions = {
    utterance?: SelfOptions['voicingUtterance'];
} & SpeakableResolvedOptions;
export interface TVoicing<SuperType extends Node = Node> extends TInteractiveHighlighting<SuperType> {
    _voicingResponsePacket: ResponsePacket;
    _voicingUtterance: Utterance | null;
    _voicingCanSpeakProperty: TinyProperty<boolean>;
    initialize(...args: IntentionalAny[]): this;
    voicingSpeakFullResponse(providedOptions?: SpeakingOptions): void;
    voicingSpeakResponse(providedOptions?: SpeakingOptions): void;
    voicingSpeakNameResponse(providedOptions?: SpeakingOptions): void;
    voicingSpeakObjectResponse(providedOptions?: SpeakingOptions): void;
    voicingSpeakContextResponse(providedOptions?: SpeakingOptions): void;
    voicingSpeakHintResponse(providedOptions?: SpeakingOptions): void;
    collectResponse(providedOptions?: SpeakingOptions): TAlertable;
    speakContent(content: TAlertable): void;
    setVoicingNameResponse(response: VoicingResponse): void;
    voicingNameResponse: ResolvedResponse;
    getVoicingNameResponse(): ResolvedResponse;
    setVoicingObjectResponse(response: VoicingResponse): void;
    voicingObjectResponse: ResolvedResponse;
    getVoicingObjectResponse(): ResolvedResponse;
    setVoicingContextResponse(response: VoicingResponse): void;
    voicingContextResponse: ResolvedResponse;
    getVoicingContextResponse(): ResolvedResponse;
    setVoicingHintResponse(response: VoicingResponse): void;
    voicingHintResponse: ResolvedResponse;
    getVoicingHintResponse(): ResolvedResponse;
    setVoicingIgnoreVoicingManagerProperties(ignoreProperties: boolean): void;
    voicingIgnoreVoicingManagerProperties: boolean;
    getVoicingIgnoreVoicingManagerProperties(): boolean;
    setVoicingResponsePatternCollection(patterns: ResponsePatternCollection): void;
    voicingResponsePatternCollection: ResponsePatternCollection;
    getVoicingResponsePatternCollection(): ResponsePatternCollection;
    setVoicingUtterance(utterance: Utterance): void;
    voicingUtterance: Utterance;
    getVoicingUtterance(): Utterance;
    setVoicingFocusListener(focusListener: SceneryListenerFunction<FocusEvent> | null): void;
    voicingFocusListener: SceneryListenerFunction<FocusEvent> | null;
    getVoicingFocusListener(): SceneryListenerFunction<FocusEvent> | null;
    defaultFocusListener(): void;
    get _isVoicing(): true;
    clean(): void;
    cleanVoicingUtterance(): void;
    mutate(options?: SelfOptions & Parameters<SuperType['mutate']>[0]): this;
}
declare const Voicing: {
    <SuperType extends Constructor<Node>>(Type: SuperType): SuperType & Constructor<TVoicing<InstanceType<SuperType>>>;
    VOICING_OPTION_KEYS: string[];
    alertUtterance(utterance: Utterance): void;
    registerUtteranceToVoicingNode(utterance: Utterance, voicingNode: TVoicing): void;
    unregisterUtteranceToVoicingNode(utterance: Utterance, voicingNode: VoicingNode): void;
    registerUtteranceToNode(utterance: Utterance, node: Node): void;
    unregisterUtteranceToNode(utterance: Utterance, node: Node): void;
};
export type VoicingNode = Node & TVoicing;
export declare function isVoicing(something: IntentionalAny): something is VoicingNode;
export default Voicing;
//# sourceMappingURL=Voicing.d.ts.map