"use client" import Image from "next/image" import { Link } from "@/i18n/navigation" import { useState } from "react" import { Github, ExternalLink } from "lucide-react" import { useTranslations, useMessages } from "next-intl" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" type LoaderKey = "arc" | "rr" | "tinycore" type LoaderLink = { name: string; url: string } type DefaultRow = { param: string; valueRich: string } type AdvancedRow = { param: string; optionsRich: string } type ItemAltCaption = { alt: string; caption: string } type DocLink = { label: string; url: string } type RelatedItem = { href: string; label: string; tail: string } export default function SynologyPage() { const [activeLoader, setActiveLoader] = useState("arc") const t = useTranslations("docs.createVm.systemNas.synology") const messages = useMessages() as unknown as { docs: { createVm: { systemNas: { synology: { supportedLoaders: { loaders: LoaderLink[] } config: { defaultRowsRich: DefaultRow[]; advancedRowsRich: AdvancedRow[] } storagePlan: { virtualItemsRich: string[]; importItemsRich: string[]; pciItemsRich: string[] } vmCreation: { itemsRich: string[] } step3: { arc: ItemAltCaption[]; rr: ItemAltCaption[]; tinycore: ItemAltCaption[] } step4: { rr: ItemAltCaption[]; tinycore: ItemAltCaption[] } tips: { docLinks: DocLink[] } related: { itemsRich: RelatedItem[] } } } } } } const s = messages.docs.createVm.systemNas.synology const loaders = s.supportedLoaders.loaders const defaultRows = s.config.defaultRowsRich const advancedRows = s.config.advancedRowsRich const virtualItems = s.storagePlan.virtualItemsRich const importItems = s.storagePlan.importItemsRich const pciItems = s.storagePlan.pciItemsRich const vmCreationItems = s.vmCreation.itemsRich const step3Arc = s.step3.arc const step3Rr = s.step3.rr const step3Tc = s.step3.tinycore const step4Rr = s.step4.rr const step4Tc = s.step4.tinycore const docLinks = s.tips.docLinks const relatedItems = s.related.itemsRich const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const gpuLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("whatThisDoes.bodyRich", { strong })}

{t("supportedLoaders.heading")}

{t("supportedLoaders.intro")}

    {loaders.map((l) => (
  • {l.name}
  • ))}
  • {t.rich("supportedLoaders.customRich", { strong, code })}

{t("config.heading")}

{t("config.intro")}

{t("config.defaultHeading")}

{defaultRows.map((row, idx) => ( ))}
{t("config.headerParam")} {t("config.headerValue")}
{row.param} {t.rich(`config.defaultRowsRich.${idx}.valueRich`, { code })}

{t("config.advancedHeading")}

{t("config.advancedIntro")}

{advancedRows.map((row, idx) => ( ))}
{t("config.headerParam")} {t("config.headerOptions")}
{row.param} {t.rich(`config.advancedRowsRich.${idx}.optionsRich`, { code })}

{t("storagePlan.heading")}

{t.rich("storagePlan.introRich", { strong })}

{t("storagePlan.virtualHeading")}

    {virtualItems.map((_, idx) => (
  • {t.rich(`storagePlan.virtualItemsRich.${idx}`, { code })}
  • ))}

{t("storagePlan.importHeading")}

    {importItems.map((_, idx) => (
  • {t.rich(`storagePlan.importItemsRich.${idx}`, { code })}
  • ))}

{t("storagePlan.pciHeading")}

    {pciItems.map((_, idx) => (
  • {t.rich(`storagePlan.pciItemsRich.${idx}`, { code, em })}
  • ))}
{t.rich("storagePlan.resetCalloutBodyRich", { strong })}

{t("gpu.heading")}

{t.rich("gpu.bodyRich", { link: gpuLink })}

{t("loaderInstall.heading")}

{t.rich("loaderInstall.intro1Rich", { strong })}

{t.rich("loaderInstall.intro2Rich", { strong, code })}

{t("loaderInstall.uploadIntro")}

{t("vmCreation.heading")}

{t.rich("vmCreation.introRich", { code })}

    {vmCreationItems.map((_, idx) => (
  • {t.rich(`vmCreation.itemsRich.${idx}`, { code, strong })}
  • ))}

{t("stepByStep.heading")}

{t("stepByStep.intro")}

{t("stepByStep.warnCalloutBody")}
{(["arc", "rr", "tinycore"] as LoaderKey[]).map((k) => ( ))}

{t("step1.intro")}

{activeLoader === "arc" && (

{t.rich("step1.arc.webRich", { strong, code })}

{t.rich("step1.arc.termRich", { strong })}

)} {activeLoader === "rr" && (

{t.rich("step1.rr.webRich", { strong, code })}

{t.rich("step1.rr.termRich", { strong, code })}

)} {activeLoader === "tinycore" && (

{t.rich("step1.tinycore.webRich", { strong, code })}

{t.rich("step1.tinycore.termRich", { strong })}

)}

{t.rich("step2.introRich", { strong })}

{activeLoader === "arc" && ( )} {activeLoader === "rr" && ( )} {activeLoader === "tinycore" && ( )}

{t("step3.intro")}

{activeLoader === "arc" && (
)} {activeLoader === "rr" && (
)} {activeLoader === "tinycore" && (
)}

{t("step4.intro")}

{activeLoader === "arc" && (

{t.rich("step4.arc.autoRich", { strong })}

{t("step4.arc.manualRich")}

)} {activeLoader === "rr" && (
)} {activeLoader === "tinycore" && (
)}

{t.rich("step5.introRich", { strong })}

{activeLoader === "arc" && ( )} {activeLoader === "rr" && ( )} {activeLoader === "tinycore" && ( )}

{t("step6.intro")}

{activeLoader === "arc" && ( )} {activeLoader === "rr" && ( )} {activeLoader === "tinycore" && ( )}

{t("dsmInstall.heading")}

{t("dsmInstall.intro")}

        https://finds.synology.com
      

{t("dsmInstall.afterCode")}

{t("dsmInstall.patience")}

{t("tips.heading")}

{t("tips.recentBody")} {t("tips.updateBody")} {t("tips.warnBody")}

{t("tips.docsHeading")}

{docLinks.map((dl) => ( {dl.label} ))}

{t("related.heading")}

    {relatedItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) } function ImageCaption({ src, alt, caption }: { src: string; alt: string; caption: string }) { return (
{alt}
{caption}
) } function StepSection({ n, title, stepLabel, children }: { n: number; title: string; stepLabel: string; children: React.ReactNode }) { return (
{stepLabel} {n}

{title}

{children}
) }