import { I18nProvider, getServerI18n } from "@/i18n";
import React, { Suspense } from "react";
import { Typography } from "@mui/material";
import CreateWarehouse from "@/components/CreateWarehouse";

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

  return (
    <>
      <Typography variant="h4">{t("Create Warehouse")}</Typography>
      <I18nProvider namespaces={["warehouse","navigation","common"]}>
        <Suspense fallback={<CreateWarehouse.Loading />}>
          <CreateWarehouse />
        </Suspense>
      </I18nProvider>
    </>
  );
};

export default CreateWarehousePage;
