/**
* @module plugins/speech-recognize
*/
import type { IControlType, IJodit, IDictionary } from 'jodit/types';
import { Config } from 'jodit/config';
import { dataBind } from 'jodit/core/helpers/utils/data-bind';
import { isBoolean } from 'jodit/core/helpers/checker/is-boolean';
import { Icon } from 'jodit/core/ui/icon';
import type { ISpeechRecognizeConstructor } from './interface';
import { RecognizeManager } from './helpers/recognize-manager';
import { SpeechRecognition } from './helpers/api';
declare module 'jodit/config' {
interface Config {
speechRecognize: {
readonly api: ISpeechRecognizeConstructor;
/**
* Returns and sets the language of the current SpeechRecognition.
* If not specified, this defaults to the HTML lang attribute value, or
* the user agent's language setting if that isn't set either.
* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/lang
*/
readonly lang?: string;
/**
* Controls whether continuous results are returned for each recognition,
* or only a single result.
* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/continuous
*/
readonly continuous: boolean;
/**
* Controls whether interim results should be returned (true) or not (false.)
* Interim results are results that are not yet final (e.g. the isFinal property is false.)
* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition/interimResults
*/
readonly interimResults: boolean;
/**
* On recognition error - make an error sound
*/
readonly sound: boolean;
/**
* You can specify any commands in your language by listing them with the `|` sign.
* In the value, write down any commands for
* [execCommand](https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#parameters)
* and value (separated by ::)
* You can also use [custom Jodit commands](#need-article)
* For example
* ```js
* Jodit.make('#editor', {
* speechRecognize: {
* commands: {
* 'remove line|remove paragraph': 'backspaceSentenceButton',
* 'start bold': 'bold',
* 'insert table|create table': 'insertHTML::