import SearchPage from "@/components/StockIssue/index";
import { PreloadList } from "@/components/StockIssue/action";
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: "Pick Order",
};

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

  PreloadList();

  return (
    <>
      <I18nProvider namespaces={["pickOrder", "common"]}>
        <Suspense fallback={<SearchPage.Loading />}>
          <SearchPage />
        </Suspense>
      </I18nProvider>
    </>
  );
};

export default SearchView;
