'use client'; import Link from 'next/link'; import { FileText, Heart, Home, LockKeyhole, LogOut, ShieldCheck, UserRound } from 'lucide-react'; import { FamilySidebarPanel } from '@/components/family/family-sidebar-panel'; import { BrandLogo } from '@/components/id/brand-logo'; import { cn } from '@/lib/utils'; import { getAdminLandingPath } from '@/lib/admin-access'; import { useAuth } from './auth-provider'; const baseItems = [ { href: '/', label: 'Главная', icon: Home }, { href: '/data', label: 'Данные', icon: UserRound }, { href: '/documents', label: 'Документы', icon: FileText }, { href: '/family', label: 'Семья', icon: Heart }, { href: '/security', label: 'Безопасность', icon: LockKeyhole } ]; export function Sidebar({ active }: { active: string }) { const { logout, user } = useAuth(); const items = user?.canAccessAdmin ? [...baseItems, { href: getAdminLandingPath(user), label: 'Админка', icon: ShieldCheck }] : baseItems; return ( ); }