import { TypeEnum } from "@/app/utils/typeEnum";
import ItemsSearch from "@/components/ItemsSearch";
import { getServerI18n } from "@/i18n";
import Add from "@mui/icons-material/Add";
import Button from "@mui/material/Button";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { Metadata } from "next";
import Link from "next/link";
import { Suspense } from "react";
import RoughScheduleLoading from "@/components/RoughScheduleSetting/RoughScheduleLoading";
import RoughScheduleSetting from "@/components/RoughScheduleSetting/RoughScheduleSetting";
import RoughScheduleSettingWrapper from "@/components/RoughScheduleSetting/RoughScheduleSettingWrapper";
import { I18nProvider } from "@/i18n";
export const metadata: Metadata = {
  title: "Demand Forecast Setting",
};

const roughScheduleSetting: React.FC = async () => {
    //const project = TypeEnum.PRODUCT
  const { t } = await getServerI18n("demandForecast", "navigation", "common");
    //   preloadClaims();

  return (
    <>
      <Stack
        direction="row"
        justifyContent="space-between"
        flexWrap="wrap"
        rowGap={2}
      >
        <Typography variant="h4" marginInlineEnd={2}>
          {t("Demand Forecast Setting")}
        </Typography>
        {/* <Button
          variant="contained"
          startIcon={<Add />}
          LinkComponent={Link}
          href="product/create"
        >
          {t("Create product")}
        </Button> */}
            </Stack>
            <Suspense fallback={<RoughScheduleSettingWrapper.Loading />}>
                <I18nProvider namespaces={["demandForecast", "navigation", "common", "project"]}>
                    <RoughScheduleSetting items={[]} />        
            </I18nProvider>
            </Suspense>
        </>
    );
};

export default roughScheduleSetting;
