'use client' import React from 'react' import Link from 'next/link' import { usePathname } from 'next/navigation' import { Shield, Download, FileCode, Layers, Smartphone, Lock, ChevronDown, ChevronRight, Home, BookOpen, Code2 } from 'lucide-react' interface NavItem { title: string href: string icon?: React.ReactNode children?: NavItem[] } const navigation: NavItem[] = [ { title: 'Uebersicht', href: '/sdk/consent', icon: , }, { title: 'Installation', href: '/sdk/consent/installation', icon: , }, { title: 'API Referenz', href: '/sdk/consent/api-reference', icon: , }, { title: 'Frameworks', href: '/sdk/consent/frameworks', icon: , children: [ { title: 'React', href: '/sdk/consent/frameworks/react' }, { title: 'Vue', href: '/sdk/consent/frameworks/vue' }, { title: 'Angular', href: '/sdk/consent/frameworks/angular' }, ], }, { title: 'Mobile SDKs', href: '/sdk/consent/mobile', icon: , children: [ { title: 'iOS (Swift)', href: '/sdk/consent/mobile/ios' }, { title: 'Android (Kotlin)', href: '/sdk/consent/mobile/android' }, { title: 'Flutter', href: '/sdk/consent/mobile/flutter' }, ], }, { title: 'Sicherheit', href: '/sdk/consent/security', icon: , }, ] function NavLink({ item, depth = 0 }: { item: NavItem; depth?: number }) { const pathname = usePathname() const isActive = pathname === item.href const isParentActive = item.children?.some((child) => pathname === child.href) const [isOpen, setIsOpen] = React.useState(isActive || isParentActive) const hasChildren = item.children && item.children.length > 0 return (
{item.icon && {item.icon}} {item.title} {hasChildren && ( )}
{hasChildren && isOpen && (
{item.children?.map((child) => ( ))}
)}
) } export function SDKDocsSidebar() { return ( ) } export default SDKDocsSidebar