'use client'; import React from 'react'; import { LayoutDashboard, FileSearch, BrainCircuit, CreditCard, User, Home, X, } from 'lucide-react'; import { Link } from '@/shared/config/i18n/navigation'; import type { CabinetSection } from '../lib/types'; // ─── Nav items ───────────────────────────────────────────────────────────────── type NavItemDef = | { id: CabinetSection; label: string; icon: React.ElementType; href?: never } | { id: 'home'; label: string; icon: React.ElementType; href: string }; const NAV_ITEMS: NavItemDef[] = [ { id: 'home', label: 'Bosh sahifa', icon: Home, href: '/' }, { id: 'dashboard', label: 'Dashboard', icon: LayoutDashboard }, { id: 'plagiat', label: 'Plagiat', icon: FileSearch }, { id: 'si', label: 'SI detektor', icon: BrainCircuit }, { id: 'payments', label: "To'lovlar tarixi", icon: CreditCard }, { id: 'profile', label: 'Profil', icon: User }, ]; // ─── Props ───────────────────────────────────────────────────────────────────── interface SidebarProps { active: CabinetSection; onNavigate: (section: CabinetSection) => void; isOpen: boolean; onClose: () => void; userName: string; } // ─── Component ───────────────────────────────────────────────────────────────── export const Sidebar: React.FC = ({ active, onNavigate, isOpen, onClose, userName, }) => ( <> {/* Mobile backdrop */} {isOpen && (
)} );