import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.settings.proxmenuxMonitor.meta" }) return { title: t("title"), description: t("description"), openGraph: { title: t("ogTitle"), description: t("ogDescription"), type: "article", url: "https://macrimi.github.io/ProxMenux/docs/settings/proxmenux-monitor", }, } } type StringItem = string type ToggleRow = { state: string; label: string; action: string } type RelatedItem = { href: string; label: string; tail?: string; tailRich?: string } export default async function ProxmenuxMonitorPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.settings.proxmenuxMonitor" }) const messages = (await getMessages({ locale })) as unknown as { docs: { settings: { proxmenuxMonitor: { offers: { items: StringItem[] } toggle: { rows: ToggleRow[] } status: { items: StringItem[] } reset: { items: StringItem[] } related: { items: RelatedItem[] } } } } } const block = messages.docs.settings.proxmenuxMonitor const offersItems = block.offers.items const toggleRows = block.toggle.rows const statusItems = block.status.items const resetItems = block.reset.items const relatedItems = block.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const link = (chunks: React.ReactNode) => ( {chunks} ) return (
{t("intro.body")}

{t("offers.heading")}

    {offersItems.map((_, idx) => (
  • {t(`offers.items.${idx}`)}
  • ))}

{t("access.heading")}

{t("access.intro")}

{t.raw("access.url") as string}

{t.rich("access.outro", { code })}

{t.rich("warnConditional.body", { code })}

{t("toggle.heading")}

{t("toggle.intro")}

{toggleRows.map((row, idx) => ( ))}
{t("toggle.headerState")} {t("toggle.headerLabel")} {t("toggle.headerAction")}
{row.state} {row.label} {row.action}

{t.rich("toggle.outro", { em })}

{t("status.heading")}

{t.rich("status.intro", { em })}

    {statusItems.map((_, idx) => (
  • {t.rich(`status.items.${idx}`, { code, strong })}
  • ))}
{t("manual.intro")}
{t.raw("manual.code") as string}

{t("reset.heading")}

{t("reset.intro")}

    {resetItems.map((_, idx) => (
  1. {t.rich(`reset.items.${idx}`, { code, strong, em })}
  2. ))}
{t.rich("reset.preservedBody", { code, strong })} {t.rich("reset.trustBody", { code })}

{t.rich("reset.seeAlso", { link })}

{t("files.heading")}

{t.raw("files.code") as string}

{t("troubleshoot.heading")}

{t.rich("troubleshoot.missingBody", { code })} {t("troubleshoot.unreachableBody")}
{t.raw("troubleshoot.unreachableCmd") as string}
{t.rich("troubleshoot.unreachableOutro", { code })}
{t.rich("troubleshoot.stopsBody", { code })}

{t("related.heading")}

    {relatedItems.map((item, idx) => (
  • {item.label} {item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
  • ))}
) }