"use client" import Link from 'next/link' import { usePathname } from 'next/navigation' import { cn } from '@/lib/utils' import { Home, Settings, Users, LogOut, Activity, Package, UserCheck, ShoppingCart, Receipt, Palette, Star, Image, Shield } from 'lucide-react' import { Button } from '@/components/ui/button' import { useAuth } from '@/components/providers/AuthProvider' interface SidebarProps { className?: string } const navigationItems = [ { title: 'Главная', href: '/dashboard', icon: Home, }, { title: 'Каталог', href: '/dashboard/catalog', icon: Package, }, { title: 'Кража', href: '/dashboard/kraja', icon: Shield, }, { title: 'Навигация сайта', href: '/dashboard/navigation', icon: Star, }, { title: 'Товары главной', href: '/dashboard/homepage-products', icon: Star, }, { title: 'Баннеры героя', href: '/dashboard/hero-banners', icon: Image, }, { title: 'Заказы', href: '/dashboard/orders', icon: ShoppingCart, }, { title: 'Клиенты', href: '/dashboard/clients', icon: UserCheck, }, { title: 'Счета', href: '/dashboard/invoices', icon: Receipt, }, { title: 'Менеджеры', href: '/dashboard/managers', icon: Users, }, { title: 'Аудит', href: '/dashboard/audit', icon: Activity, }, { title: 'Настройки', href: '/dashboard/settings', icon: Settings, }, { title: 'Тест стилей', href: '/dashboard/test-styles', icon: Palette, }, ] export const Sidebar = ({ className }: SidebarProps) => { const pathname = usePathname() const { user, logout } = useAuth() const handleLogout = async () => { await logout() window.location.href = '/login' } return (

ProtekAuto CMS

{user?.firstName} {user?.lastName}
{navigationItems.map((item) => { const Icon = item.icon const isActive = pathname === item.href return ( ) })}
) }