import Link from 'next/link' import { useRouter } from 'next/router' import { IconChevronLeft } from 'ui' import * as NavItems from './NavigationMenu.constants' import Image from 'next/image' import clientLibsCommonSections from '~/../../spec/common-client-libs-sections.json' const allFunctions = Object.values(clientLibsCommonSections.sections.functions) const NavigationMenuRefList = ({ currentLevel, setLevel, id, lib }) => { // Get only the functions with references in the current librarry // ie: if the lib === dart, only get the dart functions const allCurrentFunctions = allFunctions .map((fn: any) => { if (fn.items.flat().find((item) => item.libs.includes(lib))) return fn }) .filter((item) => item) const introItems = Object.values(clientLibsCommonSections.sections.intro[lib].items) const router = useRouter() const menu = NavItems[id] const FunctionLink = ({ title, id, icon, product, library, slug, }: { title: string name?: string id: string icon?: string product?: string library: string slug: string }) => { return (
  • {icon && } {title}
  • ) } const SideMenuTitle = ({ title }: { title: string }) => { return ( {title} ) } const Divider = () => { return
    } return (
    {/* {process.env.NEXT_PUBLIC_EXPERIMENTAL_REF !== 'true' && ( */}
    Back to Main Menu
    {/* )} */} {/* {process.env.NEXT_PUBLIC_EXPERIMENTAL_REF !== 'true' && ( */}
    {id}

    {menu.title}

    {/* )} */} {menu.extras && ( <> {' '} Resources )} {menu.extras?.map((x) => { return (
  • {x.icon && ( {x.icon} )} {x.name}
  • ) })}
    ) } export default NavigationMenuRefList