@bothub-chat/ui
Version:
Bothub UI Components
18 lines (17 loc) • 737 B
TypeScript
import { IInputMessageVoiceFile } from './types';
interface UseVoiceProps {
onVoiceFilesChange?: (files: IInputMessageVoiceFile[]) => unknown;
}
export declare const useVoice: ({ onVoiceFilesChange }: UseVoiceProps) => {
voiceFiles: IInputMessageVoiceFile[];
setVoiceFiles: import("react").Dispatch<import("react").SetStateAction<IInputMessageVoiceFile[]>>;
isVoiceRecording: boolean;
isVoicePaused: boolean;
voiceRecordingTime: number | null;
handleVoiceRecordStart: import("react").ReactEventHandler<Element>;
handleVoiceRecordEnd: () => Promise<void>;
handleVoicePause: () => void;
handleVoiceResume: () => void;
handleVoiceFileDelete: (file: IInputMessageVoiceFile) => void;
};
export {};