'use client' import React from 'react' import Link from 'next/link' import { usePathname, useParams } from 'next/navigation' const IACE_NAV_ITEMS = [ { id: 'overview', label: 'Uebersicht', href: '', icon: 'grid' }, { id: 'components', label: 'Komponenten', href: '/components', icon: 'cube' }, { id: 'classification', label: 'Klassifikation', href: '/classification', icon: 'tag' }, { id: 'hazards', label: 'Hazard Log', href: '/hazards', icon: 'warning' }, { id: 'mitigations', label: 'Massnahmen', href: '/mitigations', icon: 'shield' }, { id: 'verification', label: 'Verifikation', href: '/verification', icon: 'check' }, { id: 'evidence', label: 'Nachweise', href: '/evidence', icon: 'document' }, { id: 'tech-file', label: 'CE-Akte', href: '/tech-file', icon: 'folder' }, { id: 'monitoring', label: 'Monitoring', href: '/monitoring', icon: 'activity' }, ] function NavIcon({ icon, className }: { icon: string; className?: string }) { const cls = className || 'w-5 h-5' switch (icon) { case 'grid': return ( ) case 'cube': return ( ) case 'tag': return ( ) case 'warning': return ( ) case 'shield': return ( ) case 'check': return ( ) case 'document': return ( ) case 'folder': return ( ) case 'activity': return ( ) default: return null } } export default function IACELayout({ children }: { children: React.ReactNode }) { const pathname = usePathname() const params = useParams() const projectId = params?.projectId as string | undefined const basePath = projectId ? `/sdk/iace/${projectId}` : '' const isActive = (href: string) => { if (!projectId) return false const fullPath = `${basePath}${href}` if (href === '') { return pathname === fullPath } return pathname.startsWith(fullPath) } return (