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.uninstallProxmenux.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/uninstall-proxmenux", }, } } type StringItem = string type DepRow = { type: string; offered?: string; offeredRich?: string } type RelatedItem = { href: string; label: string; tail?: string } export default async function UninstallProxMenuxPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.settings.uninstallProxmenux" }) const messages = (await getMessages({ locale })) as unknown as { docs: { settings: { uninstallProxmenux: { flow: { items: StringItem[] } deps: { rows: DepRow[] } restored: { items: StringItem[] } related: { items: RelatedItem[] } } } } } const block = messages.docs.settings.uninstallProxmenux const flowItems = block.flow.items const depRows = block.deps.rows const restoredItems = block.restored.items const relatedItems = block.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} return (
{t.rich("scopeWarn.body", { strong })}

{t("flow.heading")}

    {flowItems.map((_, idx) => (
  1. {t.rich(`flow.items.${idx}`, { code, strong })}
  2. ))}

{t("deps.heading")}

{t.rich("deps.intro", { strong })}

{depRows.map((row, idx) => ( ))}
{t("deps.headerType")} {t("deps.headerOffered")}
{row.type} {row.offeredRich ? t.rich(`deps.rows.${idx}.offeredRich`, { code }) : row.offered}
{t.rich("deps.warnBody", { code })}

{t("removed.heading")}

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

{t("restored.heading")}

    {restoredItems.map((_, idx) => (
  • {t.rich(`restored.items.${idx}`, { code, em })}
  • ))}
{t.rich("othersCallout.body", { strong, em })}

{t("manual.heading")}

{t.rich("manual.intro", { code })}

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

{t("reinstall.heading")}

{t("reinstall.body")}

{t("troubleshoot.heading")}

{t.rich("troubleshoot.hangBody", { code })} {t.rich("troubleshoot.aptBody", { code })} {t.rich("troubleshoot.motdBody", { code })}

{t("related.heading")}

    {relatedItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) }