import type { ButtonHTMLAttributes, ReactNode } from "react"; import type { Blocker, Refusal, State } from "./types.js"; /** What the button draws: any of this package's machines — the dictation and * conversation machine (`useVoice`), talk mode (`useTalk`) or a live transcript * (`useTranscript`). */ export interface Machine { state: State; open: boolean; /** Sampled on animation frames for the meter. */ level: number; blocked: Blocker | null; reason: string | null; refusal: Refusal | null; toggle: () => void; } export interface VoiceProps extends Omit, "onClick" | "children"> { /** The machine, from `useVoice`, `useTalk` or `useTranscript`. */ voice: Machine; /** Disabled for the surface's own reasons — mid-submit, say. */ disabled?: boolean; /** Override the glyph. Given the state, so it can change with it. */ children?: ReactNode | ((state: State) => ReactNode); /** What the button says in each state, where the surface's meaning differs * from a conversation — a dictation mic, a transcript. */ says?: Partial>; } /** * The one microphone. * * It draws a machine and nothing else: no transcript, no timer, no colour. The * surface supplies the chrome through `className`, which is why the same * control sits inside hanzo.chat's composer and hanzo.app's console bar without * either of them carrying a copy of it. * * When voice cannot run the button stays, disabled, wearing the reason — a * control that quietly disappears teaches the user nothing. It wears a platform * refusal the same way: a browser standing in for a refused speech service * sounds like success, and only the label says otherwise. */ export declare function Voice({ voice, disabled, children, says, ...rest }: VoiceProps): import("react").JSX.Element; //# sourceMappingURL=control.d.ts.map