import { useState } from "react"; import { useVoiceMode } from "@/hooks/useVoiceMode"; type VoiceMode = "text" | "voice_input" | "full_voice"; const PILLS: { label: string; value: VoiceMode }[] = [ { label: "Text", value: "text" }, { label: "Voice In", value: "voice_input" }, { label: "Full Voice", value: "full_voice" }, ]; export function VoiceModeToggle() { const { mode, setMode, isLoading } = useVoiceMode(); const [autoPlay, setAutoPlay] = useState( () => localStorage.getItem("nexus:voice:autoplay") === "true" ); function handleAutoPlayChange(checked: boolean) { setAutoPlay(checked); localStorage.setItem("nexus:voice:autoplay", String(checked)); } return (
{PILLS.map(({ label, value }) => ( ))}
{mode === "full_voice" && ( )}
); }