"use client"; import Link from "next/link"; import { useMemo, useState } from "react"; import { usePathname } from "next/navigation"; import clsx from "clsx"; import { ArrowLeft, BookOpen, Menu, Search } from "lucide-react"; import styles from "./DocsLayout.module.css"; import { DocsLocale, DocsPage, DocsPageContent, } from "@/content/docs/docs"; import { DOCS_GROUPS } from "@/content/docs/docs.config"; import { DOCS_PAGES } from "@/content/docs/docs"; import { useI18n } from "@/hooks/useI18n"; function DocsHeader() { const { locale, setLocale } = useI18n(); return (
PolyWeather {locale === "zh-CN" ? "产品文档中心" : "Product Documentation"}
); } function DocsSidebar({ currentSlug, locale, open, onClose, }: { currentSlug: string; locale: DocsLocale; open: boolean; onClose: () => void; }) { return ( <> {open &&

{localizedPage.title}

{localizedPage.description}

{searchQuery.trim() ? (
{searchResults.length === 0 ? (
{locale === "zh-CN" ? "没有匹配文档" : "No matching docs"}
) : ( searchResults.map((result) => ( {result.title} {result.sectionTitle || result.description} )) )}
) : null}
{locale === "zh-CN" ? "当前工作台" : "Current terminal"} {locale === "zh-CN" ? `${DOCS_PAGES.length} 篇文档` : `${DOCS_PAGES.length} docs`} {locale === "zh-CN" ? `${localizedPage.sections.length} 个章节` : `${localizedPage.sections.length} sections`}
{localizedPage.sections.map((section) => (

{section.title}

{section.blocks.map((block, index) => ( ))}
))} ); }