import { PreloadPickOrder } from "@/app/api/pickOrder";
import FinishedGoodSearch from "@/components/FinishedGoodSearch/";
import { getServerI18n } from "@/i18n";
import { I18nProvider } from "@/i18n";
import { Stack, Typography } from "@mui/material";
import { Metadata } from "next";
import { Suspense } from "react";

export const metadata: Metadata = {
  title: "Finished Good Order",
};

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

  //PreloadPickOrder();

  return (
    <>
      <I18nProvider namespaces={["finishedGood","navigation","common","pickOrder","ticketReleaseTable","purchaseOrder","home","item"]}>
        <Suspense fallback={<FinishedGoodSearch.Loading />}>
          <FinishedGoodSearch />
        </Suspense>
      </I18nProvider>
    </>
  );
};

export default PickOrder;
