import DoSearchWorkbench from "@/components/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";

export const metadata: Metadata = {
  title: "DO Workbench Search",
};

const DoWorkbenchSearchPage: React.FC = async () => {
  const { t } = await getServerI18n("do");

  return (
    <>
      <PageTitleBar
        title={t("DO Workbench Search", { defaultValue: "DO Workbench Search" })}
        className="mb-4"
      />
      <I18nProvider namespaces={["do", "common"]}>
        <Suspense fallback={<GeneralLoading />}>
          <DoSearchWorkbench />
        </Suspense>
      </I18nProvider>
    </>
  );
};

export default DoWorkbenchSearchPage;
