import { Badge, getMobileSidebarItems } from "docs-ui" import type { SidebarConfig, SidebarItemType } from "@/types" import { sidebar } from "../sidebar.mjs" const soonBadge = Soon const normalizeSidebarItems = (items: SidebarItemType[]) => items.map((item) => { if (item.isSoon) { item.additionalElms = soonBadge } if (item.children) { item.children = normalizeSidebarItems(item.children as SidebarItemType[]) } return item }) export const sidebarConfig = (baseUrl: string): SidebarConfig => { return { top: normalizeSidebarItems(sidebar), bottom: [], mobile: getMobileSidebarItems({ baseUrl, version: "v2", }), } }