'use client'; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, } from '@headlessui/react'; import { ChevronUpDownIcon } from '@/components/icons/Icons'; import { useConfig } from '@/contexts/ConfigContext'; export const VoicesControl = ({ availableVoices, setVoiceAndRestart }: { availableVoices: string[]; setVoiceAndRestart: (voice: string) => void; }) => { const { voice: configVoice } = useConfig(); // Use configVoice as the source of truth const currentVoice = configVoice; return (