---
import DocPage from "../../components/DocPage.astro";
import { BOT_PLATFORM_LABELS_ZH, zhBotDocs, botPlatformFromPath } from "../../bot-platforms";

export function getStaticPaths() {
  return Object.entries(zhBotDocs).map(([filePath, mod]) => {
    const platform = botPlatformFromPath(filePath) as keyof typeof BOT_PLATFORM_LABELS_ZH;

    return {
      params: { platform },
      props: {
        mod,
        activeSidebarItem: BOT_PLATFORM_LABELS_ZH[platform],
      },
    };
  });
}

const { mod, activeSidebarItem } = Astro.props;
---

<DocPage locale="zh" pageKey="configuration" doc={mod} activeSidebarItem={activeSidebarItem} />
