'use client'; import { cn } from '@/lib/utils'; import { BookOpenText, Home, Search, SquarePen, Settings } from 'lucide-react'; import Link from 'next/link'; import { useSelectedLayoutSegments } from 'next/navigation'; import React, { useState, type ReactNode } from 'react'; import Layout from './Layout'; import { useTranslations } from 'next-intl'; const VerticalIconContainer = ({ children }: { children: ReactNode }) => { return (
{children}
); }; const Sidebar = ({ children }: { children: React.ReactNode }) => { const segments = useSelectedLayoutSegments(); const t = useTranslations('navigation'); const navLinks = [ { icon: Home, href: '/', active: segments.length === 0 || segments.includes('c'), label: t('home'), }, { icon: Search, href: '/discover', active: segments.includes('discover'), label: t('discover'), }, { icon: BookOpenText, href: '/library', active: segments.includes('library'), label: t('library'), }, ]; return (
{navLinks.map((link, i) => ( {link.active && (
)} ))}
{navLinks.map((link, i) => ( {link.active && (
)}

{link.label}

))}
{children}
); }; export default Sidebar;