import { TextInputProps, TextareaProps } from '@mantine/core';
interface SpeechRecognitionEvent {
    resultIndex: number;
    results: SpeechRecognitionResultList;
}
interface SpeechRecognitionErrorEvent {
    error: string;
    message: string;
}
interface SpeechRecognition extends EventTarget {
    continuous: boolean;
    interimResults: boolean;
    lang: string;
    start: () => void;
    stop: () => void;
    abort: () => void;
    onresult: ((event: SpeechRecognitionEvent) => void) | null;
    onerror: ((event: SpeechRecognitionErrorEvent) => void) | null;
    onend: (() => void) | null;
    onstart: (() => void) | null;
}
declare global {
    interface Window {
        SpeechRecognition: new () => SpeechRecognition;
        webkitSpeechRecognition: new () => SpeechRecognition;
    }
}
export interface UseArchbaseSpeechToTextOptions {
    /** Idioma (padrão: pt-BR) */
    lang?: string;
    /** Modo contínuo */
    continuous?: boolean;
    /** Resultados intermediários */
    interimResults?: boolean;
    /** Callback ao obter transcrição */
    onTranscript?: (transcript: string, isFinal: boolean) => void;
    /** Callback em caso de erro */
    onError?: (error: string) => void;
    /** Callback ao iniciar */
    onStart?: () => void;
    /** Callback ao parar */
    onEnd?: () => void;
}
export interface UseArchbaseSpeechToTextReturn {
    /** Se está gravando */
    isListening: boolean;
    /** Transcrição atual */
    transcript: string;
    /** Se o browser suporta */
    isSupported: boolean;
    /** Último erro */
    error: string | null;
    /** Iniciar gravação */
    start: () => void;
    /** Parar gravação */
    stop: () => void;
    /** Limpar transcrição */
    clear: () => void;
}
export declare function useArchbaseSpeechToText({ lang, continuous, interimResults, onTranscript, onError, onStart, onEnd, }?: UseArchbaseSpeechToTextOptions): UseArchbaseSpeechToTextReturn;
export interface ArchbaseSpeechToTextButtonProps {
    /** Callback ao obter transcrição */
    onTranscript: (transcript: string) => void;
    /** Idioma (padrão: pt-BR) */
    lang?: string;
    /** Modo contínuo */
    continuous?: boolean;
    /** Desabilitado */
    disabled?: boolean;
    /** Tamanho do botão */
    size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
    /** Cor */
    color?: string;
    /** Tooltip quando desabilitado/não suportado */
    unsupportedTooltip?: string;
}
export declare function ArchbaseSpeechToTextButton({ onTranscript, lang, continuous, disabled, size, color, unsupportedTooltip, }: ArchbaseSpeechToTextButtonProps): import("react/jsx-runtime").JSX.Element;
export interface ArchbaseSpeechToTextInputProps extends Omit<TextInputProps, 'value' | 'onChange'> {
    /** Valor atual */
    value?: string;
    /** Callback ao mudar */
    onChange?: (value: string) => void;
    /** Idioma (padrão: pt-BR) */
    lang?: string;
    /** Modo contínuo */
    continuous?: boolean;
    /** Substituir ou anexar transcrição */
    mode?: 'replace' | 'append';
    /** Mostrar indicador de gravação */
    showRecordingIndicator?: boolean;
}
export declare function ArchbaseSpeechToTextInput({ value, onChange, lang, continuous, mode, showRecordingIndicator, ...props }: ArchbaseSpeechToTextInputProps): import("react/jsx-runtime").JSX.Element;
export interface ArchbaseSpeechToTextAreaProps extends Omit<TextareaProps, 'value' | 'onChange'> {
    /** Valor atual */
    value?: string;
    /** Callback ao mudar */
    onChange?: (value: string) => void;
    /** Idioma (padrão: pt-BR) */
    lang?: string;
    /** Modo contínuo */
    continuous?: boolean;
    /** Substituir ou anexar transcrição */
    mode?: 'replace' | 'append';
}
export declare function ArchbaseSpeechToTextArea({ value, onChange, lang, continuous, mode, ...props }: ArchbaseSpeechToTextAreaProps): import("react/jsx-runtime").JSX.Element;
export default ArchbaseSpeechToTextInput;
