import { Home, Loader2, Settings } from 'lucide-react'; import voiceboxLogo from '@/assets/voicebox-logo.png'; import { cn } from '@/lib/utils/cn'; import { useGenerationStore } from '@/stores/generationStore'; import { usePlayerStore } from '@/stores/playerStore'; interface SidebarProps { activeTab: string; onTabChange: (tab: string) => void; } const tabs = [ { id: 'main', icon: Home, label: 'Main' }, { id: 'settings', icon: Settings, label: 'Settings' }, ]; export function Sidebar({ activeTab, onTabChange }: SidebarProps) { const isGenerating = useGenerationStore((state) => state.isGenerating); const audioUrl = usePlayerStore((state) => state.audioUrl); const isPlayerVisible = !!audioUrl; return (
{/* Logo */}
Voicebox
{/* Navigation Buttons */}
{tabs.map((tab) => { const Icon = tab.icon; const isActive = activeTab === tab.id; return ( ); })}
{/* Spacer to push loader to bottom */}
{/* Generation Loader */} {isGenerating && (
)}
); }