import { useTranslation } from '@/lib/use-translation' import { CheckIcon, SettingsPageContent, SettingsSection } from '@/components/settings/SettingsPrimitives' import { useVoiceSettings } from './useVoiceSettings' function PlayIcon() { return } function StopIcon() { return } export default function SettingsVoiceVoicesPage() { const { t } = useTranslation() const voice = useVoiceSettings() return ( voice.setVoice(null)} className={`flex min-h-12 w-full items-center justify-between px-3 py-3 text-left ${voice.voiceId === null ? 'bg-[var(--app-subtle-bg)] text-[var(--app-link)]' : 'text-[var(--app-fg)] hover:bg-[var(--app-subtle-bg)]'}`}> {t('settings.voice.voiceDefault')} {voice.voiceId === null ? : null} {voice.voices.map((option) => { const selected = voice.voiceId === option.id const playing = voice.playingVoiceId === option.id const canPreview = voice.backend === 'elevenlabs' && Boolean(option.previewUrl) return ( voice.setVoice(option.id)} className={`min-w-0 flex-1 px-3 py-2.5 text-left ${selected ? 'text-[var(--app-link)]' : 'text-[var(--app-fg)] hover:bg-[var(--app-subtle-bg)]'}`}> {option.name} {option.description ? {option.description} : null} {selected ? : null} voice.previewVoice(option)} aria-label={playing ? t('settings.voice.preview.stop') : t('settings.voice.preview.play')} title={canPreview ? (playing ? t('settings.voice.preview.stop') : t('settings.voice.preview.play')) : t(voice.backend === 'elevenlabs' ? 'settings.voice.preview.unavailable' : 'settings.voice.preview.elevenlabsOnly')} className="flex h-11 w-11 shrink-0 items-center justify-center text-[var(--app-hint)] hover:text-[var(--app-fg)] disabled:cursor-not-allowed disabled:opacity-30"> {playing ? : } ) })} ) }