import Link from 'next/link' import { useRouter } from 'next/router' import clsx from 'clsx' import { AnimatePresence, motion } from 'framer-motion' import { Button } from '@/components/Button' import { Tag } from '@/components/Tag' import { remToPx } from '@/lib/remToPx' import { useEffect, useState } from 'react' import { NavigationStateProvider, useNavigationState, } from '@/components/NavigationState' export const apiNavigation = [ { title: 'Guides', links: [ { title: 'Quickstart', href: '/api/guides/quickstart' }, { title: 'Authentication', href: '/api/guides/authentication' }, { title: 'Errors', href: '/api/guides/errors' }, { title: 'MSP API access', href: '/api/guides/msp-api-access' }, ], }, { title: 'Resources', links: [ { title: 'Accounts', href: '/api/resources/accounts' }, { title: 'Users', href: '/api/resources/users' }, { title: 'Tokens', href: '/api/resources/tokens' }, { title: 'Peers', href: '/api/resources/peers' }, { title: 'Setup Keys', href: '/api/resources/setup-keys' }, { title: 'Groups', href: '/api/resources/groups' }, { title: 'Policies', href: '/api/resources/policies' }, { title: 'Posture Checks', href: '/api/resources/posture-checks' }, { title: 'Geo Locations', href: '/api/resources/geo-locations' }, { title: 'Routes (deprecated)', href: '/api/resources/routes' }, { title: 'Networks', href: '/api/resources/networks' }, { title: 'DNS', href: '/api/resources/dns' }, { title: 'DNS Zones', href: '/api/resources/dns-zones' }, { title: 'Services', href: '/api/resources/services' }, { title: 'Agent Network', href: '/api/resources/agent-network' }, { title: 'Events', href: '/api/resources/events' }, { title: 'Event Streaming', href: '/api/resources/event-streaming-integrations', }, { title: 'Jobs', href: '/api/resources/jobs' }, { title: 'Identity Providers', href: '/api/resources/identity-providers', }, { title: 'Instance', href: '/api/resources/instance' }, ], }, { title: 'Cloud Resources', links: [ { title: 'Ingress Ports', href: '/api/resources/ingress-ports' }, { title: 'IDP (Azure API)', href: '/api/resources/idp-azure-integrations', }, { title: 'IDP (Google API)', href: '/api/resources/idp-google-integrations', }, { title: 'IDP (Okta SCIM)', href: '/api/resources/idp-okta-scim-integrations', }, { title: 'IDP (SCIM Generic)', href: '/api/resources/idp-scim-integrations', }, { title: 'Event Streaming', href: '/api/resources/event-streaming-integrations', }, { title: 'EDR Peers', href: '/api/resources/edr-peers' }, { title: 'EDR Falcon', href: '/api/resources/edr-falcon-integrations' }, { title: 'EDR FleetDM', href: '/api/resources/edr-fleetdm-integrations' }, { title: 'EDR Huntress', href: '/api/resources/edr-huntress-integrations', }, { title: 'EDR Intune', href: '/api/resources/edr-intune-integrations' }, { title: 'EDR SentinelOne', href: '/api/resources/edr-sentinelone-integrations', }, { title: 'Notifications', href: '/api/resources/notifications' }, { title: 'MSP', href: '/api/resources/msp' }, { title: 'Invoice', href: '/api/resources/invoice' }, { title: 'Usage', href: '/api/resources/usage' }, ], }, ] export function NavigationAPI({ tableOfContents, className }) { return ( ) } export function TopLevelNavItem({ href, children }) { return (