import { useState } from 'react'; import { Dialog, DialogContent, DialogTitle } from '../ui/dialog'; import { SettingsNavigation, type SettingsSection } from './SettingsNavigation'; import { ApiKeysSection } from './sections/ApiKeysSection'; import { VoiceSection } from './sections/VoiceSection'; import { AppearanceSection } from './sections/AppearanceSection'; type SettingsPanelProps = { isOpen: boolean; onClose: () => void; }; const sectionTitles: Record = { 'api-keys': 'API Keys', voice: 'Voice & TTS', appearance: 'Appearance', }; const sectionDescriptions: Record = { 'api-keys': 'Manage API keys for LLM providers', voice: 'Configure text-to-speech settings', appearance: 'Customize theme and UI preferences', }; export function SettingsPanel({ isOpen, onClose }: SettingsPanelProps) { const [activeSection, setActiveSection] = useState('api-keys'); const renderSection = () => { switch (activeSection) { case 'api-keys': return ; case 'voice': return ; case 'appearance': return ; default: return null; } }; return ( !open && onClose()}> {/* Visually hidden title for accessibility */} Settings
{/* Left Navigation - hidden on mobile, shown on md+ */}
{/* Right Content Area */}
{/* Mobile header with navigation */}
{/* Desktop header */}

{sectionTitles[activeSection]}

{sectionDescriptions[activeSection]}

{/* Section content - scrollable */}
{renderSection()}
); }