"use client"; import { Field, Label } from "@headlessui/react"; import clsx from "clsx"; import Link from "next/link"; import { useSelectedLayoutSegments } from "next/navigation"; import { type HTMLAttributes, useState, type ComponentProps, type ElementType, } from "react"; import * as apis from "../../apis"; import { Select } from "../Select"; type Chain = keyof typeof apis; const CHAINS = Object.keys(apis) as Chain[]; const CHAIN_TO_NAME = { evm: "EVM", aptos: "Aptos", cosmwasm: "CosmWasm", offchain: "Off-Chain", }; const MENU = Object.fromEntries( Object.entries(apis).map(([chain, methods]) => [ chain, Object.entries(methods).map(([name]) => ({ name, href: `/price-feeds/${chain}/${name}`, })), ]), ); export const Sidebar = ({ className, ...props }: Omit, "children">) => { const [chain, setChain] = useState("evm"); return ( <>