'use client'; import Link from 'next/link'; import { usePathname } from 'next/navigation'; import { cn } from '@/lib/utils'; import Image from 'next/image'; import { Josefin_Sans } from 'next/font/google'; import { Montserrat } from 'next/font/google'; import { LayoutDashboard, FolderOpen, Users, UserCog, Settings, ChevronLeft, ChevronRight, ListTodo, CalendarRange, } from 'lucide-react'; import { useState } from 'react'; import { useSession } from 'next-auth/react'; import { Button } from '@/components/ui/button'; const navItems = [ { href: '/dashboard', label: 'Dashboard', icon: LayoutDashboard }, { href: '/projects', label: 'Projects', icon: FolderOpen }, { href: '/tasks', label: 'My Tasks', icon: ListTodo, hideForClient: true }, { href: '/schedule', label: 'Schedule', icon: CalendarRange, adminOnly: true }, { href: '/clients', label: 'Clients', icon: Users, adminOnly: true }, { href: '/users', label: 'Users', icon: UserCog, adminOnly: true, adminStrictOnly: true }, { href: '/settings', label: 'Settings', icon: Settings }, ]; const josefin = Josefin_Sans({ subsets: ['latin'], weight: ['300', '400'], }); const montserrat = Montserrat({ subsets: ['latin'], weight: ['200', '500', '600'], }); export function Sidebar() { const pathname = usePathname(); const { data: session } = useSession(); const [collapsed, setCollapsed] = useState(false); const isAdmin = ['ADMIN', 'PRODUCER'].includes(session?.user?.role ?? ''); return ( ); }