import DoSearchWorkbench from "@/components/DoSearchWorkbench/DoSearchWorkbench";
import { getServerI18n } from "@/i18n";
import PageTitleBar from "@/components/PageTitleBar";
import { I18nProvider } from "@/i18n";
import { Metadata } from "next";
import { Suspense } from "react";
import GeneralLoading from "@/components/General/GeneralLoading";
import Link from "next/link";

export const metadata: Metadata = {
  title: "DO Workbench (copy)",
};

/** Dev alias — prefer canonical route `/doworkbench`. */
const Page: React.FC = async () => {
  const { t } = await getServerI18n("do");

  return (
    <>
      <PageTitleBar title={t("DO Workbench (dev)", { defaultValue: "DO Workbench (dev)" })} className="mb-4" />
      <p className="mb-2 text-sm text-gray-600">
        <Link href="/doworkbench" className="underline">
          /doworkbench
        </Link>
      </p>
      <I18nProvider namespaces={["do","navigation","common","home"]}>
        <Suspense fallback={<GeneralLoading />}>
          <DoSearchWorkbench workbenchHrefBase="/do copy 2" />
        </Suspense>
      </I18nProvider>
    </>
  );
};

export default Page;
