import DoWorkbenchTabs from "@/components/DoWorkbench/DoWorkbenchTabs";
import PageTitleBar from "@/components/PageTitleBar";
import { getServerI18n, I18nProvider } from "@/i18n";
import { Metadata } from "next";
import { fetchPrinterCombo } from "@/app/api/settings/printer";

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

const DoWorkbenchPage: React.FC = async () => {
  const { t } = await getServerI18n("doWorkbench");
  const printerCombo = await fetchPrinterCombo();

  return (
    <>
      <PageTitleBar title={t("DO Workbench", { defaultValue: "DO Workbench" })} className="mb-4" />
      <I18nProvider namespaces={["doWorkbench","navigation","common","pickOrder","ticketReleaseTable","do"]}>
        <DoWorkbenchTabs printerCombo={printerCombo ?? []} />
      </I18nProvider>
    </>
  );
};

export default DoWorkbenchPage;
