'use client'; import { usePathname, useRouter } from 'next/navigation'; import { useAuth } from '@/lib/auth-context'; interface NavItem { label: string; icon: string; path: string; } const NAV_ITEMS: NavItem[] = [ { label: '대시보드', icon: 'dashboard', path: '' }, { label: '검사 템플릿', icon: 'assignment', path: '/templates' }, { label: '검사 실행', icon: 'fact_check', path: '/inspections' }, { label: '알람', icon: 'notifications', path: '/alarms' }, ]; export function TopNav({ tenantId, tenantName }: { tenantId: string; tenantName?: string }) { const { user, logout } = useAuth(); const router = useRouter(); const pathname = usePathname(); const isActive = (path: string) => { const fullPath = `/${tenantId}${path}`; if (path === '') return pathname === fullPath; return pathname.startsWith(fullPath); }; return ( ); }