import { type DesktopDictation, type DesktopDictationHistoryEntry, type DesktopDictationModel, type DesktopDictationPermissionId, type DesktopDictationSettings, type DesktopDictationStatus } from "@opengeni/sdk/desktop-bridge"; import { type OpenGeniText } from "../../messages/runtime.js"; /** As the app keeps them. */ export type UseDesktopDictationResult = { /** The app's dictation, or null outside a desktop app that offers it. */ dictation: DesktopDictation | null; /** Null until read. */ status: DesktopDictationStatus | null; /** Newest first. */ history: DesktopDictationHistoryEntry[]; saving: boolean; /** A plain sentence when the last change couldn't be saved. */ error: string | null; /** Saves a change; resolves to the app's status after it, or null when it wasn't saved. */ update: (change: Partial) => Promise; requestPermission: (id: DesktopDictationPermissionId) => void; clearHistory: () => Promise; /** Transcribe a kept dictation again; null in apps that can't. */ transcribeAgain: ((id: string) => void) | null; }; /** The app's dictation settings and recent dictations, kept current. */ export declare function useDesktopDictation(given?: DesktopDictation | null | undefined): UseDesktopDictationResult; export type DesktopDictationSettingsProps = { /** The app's dictation. `getDesktopDictation()` by default. */ dictation?: DesktopDictation | null | undefined; /** Languages offered for each shortcut, as ISO codes. Common languages by default. */ languages?: readonly string[] | undefined; /** * The speech-to-text models a shortcut can pick, such as one for English * and another for Norwegian: the signed-in workspace's * `clientConfig.voiceInput.models`. Without them each shortcut uses the * workspace's voice input model and no model is offered. */ models?: readonly DictationModelChoice[] | undefined; className?: string | undefined; }; /** A model a dictation shortcut can pick, as the workspace's voice input lists it. */ export type DictationModelChoice = DesktopDictationModel & { providerName: string; /** The model's name, such as "MAI-Transcribe-2". */ name: string; }; /** * Settings for dictation from anywhere, shown only inside a desktop app that * offers it on this computer. Pair it with {@link DesktopDictationHost} * mounted on the signed-in pages. */ export declare function DesktopDictationSettings({ dictation: given, languages, models, className, }: DesktopDictationSettingsProps): import("react").JSX.Element | null; /** What a shortcut is called: its language, or "Any language" when it detects one. */ export declare function profileName(language: string | null, t: OpenGeniText): string;