import { useRouter } from 'next/router' import clsx from 'clsx' import {ActivePageMarker, NavLink, TopLevelNavItem, VisibleSectionHighlight} from "@/components/NavigationAPI"; import {AnimatePresence, motion} from "framer-motion"; import {Button} from "@/components/mdx"; export const docsNavigation = [ { title: 'About NetBird', links: [ { title: 'Why Wireguard with NetBird?', href: '/docs/about-netbird/why-wireguard-with-netbird' }, { title: 'How Netbird Works', href: '/docs/about-netbird/how-netbird-works' }, { title: 'NetBird vs. Traditional VPN', href: '/docs/about-netbird/netbird-vs-traditional-vpn' }, { title: 'Other', href: '/docs/about-netbird/other' }, { title: 'FAQ', href: '/docs/about-netbird/faq' }, ], }, { title: 'How-to', links: [ { title: 'Getting Started', href: '/docs/how-to/getting-started' }, { title: 'Register peers using setup keys', href: '/docs/how-to/register-peers-using-setup-keys' }, { title: 'Restrict access to peers', href: '/docs/how-to/restrict-access-to-peers' }, { title: 'Add Users to your network', href: '/docs/how-to/add-users-to-you-network' }, { title: 'Use service users with access token', href: '/docs/how-to/use-service-users-with-access-token' }, { title: 'Configure periodic user authentication', href: '/docs/how-to/configure-periodic-user-authentication' }, { title: 'Monitor system and network activity', href: '/docs/how-to/monitor-system-and-network-activity' }, { title: 'Routing traffic to private networks', href: '/docs/how-to/routing-traffic-to-private-networks' }, { title: 'Examples', href: '/docs/how-to/examples' }, { title: 'CLI', href: '/docs/how-to/cli' }, ], }, { title: 'Self-Hosted', links: [ { title: 'Installation Guide', href: '/docs/selfhosted/selfhosted-guide' }, { title: 'Identity Providers', href: '/docs/selfhosted/identity-providers' }, ], }, ] export function NavigationDocs(props) { return ( ) } function NavigationGroup({ group, className }) { let router = useRouter() let isActiveGroup = group.links.findIndex((link) => link.href === router.pathname) !== -1 return (
  • {group.title}
    {isActiveGroup && ( )} {isActiveGroup && ( )}
      {group.links.map((link) => ( {link.title} {/**/} {/* {link.href === router.pathname && sections.length > 0 && (*/} {/* */} {/* {sections.map((section) => (*/} {/*
    • */} {/* */} {/* {section.title}*/} {/* */} {/*
    • */} {/* ))}*/} {/* */} {/* )}*/} {/*
      */}
      ))}
  • ) }