import { NgZone, ElementRef, TemplateRef, OnInit } from '@angular/core'; import { BaseWidget } from '../base-widget'; import { NgAisInstantSearch } from '../instantsearch/instantsearch'; import { NgAisIndex } from '../index-widget/index-widget'; declare type Status = 'initial' | 'askingPermission' | 'waiting' | 'recognizing' | 'finished' | 'error'; declare type ErrorCode = 'no-speech' | 'aborted' | 'audio-capture' | 'network' | 'not-allowed' | 'service-not-allowed' | 'bad-grammar' | 'language-not-supported'; declare type TemplateContext = { status: Status; transcript: string; isSpeechFinal: boolean; errorCode?: ErrorCode; isBrowserSupported: boolean; isListening: boolean; }; declare type VoiceListeningState = { status: Status; transcript: string; isSpeechFinal: boolean; errorCode?: ErrorCode; }; declare type State = { isBrowserSupported: boolean; isListening: boolean; toggleListening: () => void; voiceListeningState: VoiceListeningState; templateContext: TemplateContext; }; export declare class NgAisVoiceSearch extends BaseWidget implements OnInit { parentIndex: NgAisIndex; instantSearchInstance: NgAisInstantSearch; private zone; button: TemplateRef; status: TemplateRef; searchAsYouSpeak?: boolean; buttonTitle: string; disabledButtonTitle: string; state: State; constructor(parentIndex: NgAisIndex, instantSearchInstance: NgAisInstantSearch, zone: NgZone); ngOnInit(): void; handleClick: (event: MouseEvent) => void; isNotAllowedError: () => boolean; updateState: (state: State) => void; } export {};