//src\app\(main)\analytics\DelayReport\page.tsx
import { Metadata } from "next";
import { I18nProvider, getServerI18n } from "@/i18n";
import Typography from "@mui/material/Typography";;
import { fetchAllCustomers } from "@/app/api/customer";
import { fetchTeam } from "@/app/api/team";
import { Suspense } from "react";
import GenerateProjectPotentialDelayReport from "@/components/GenerateProjectPotentialDelayReport";

export const metadata: Metadata = {
  title: "Project Potential Delay Report",
};

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

  fetchAllCustomers()
  fetchTeam()

  return (
    <>
      <Typography variant="h4" marginInlineEnd={2}>
        {t("Project Potential Delay Report")}
      </Typography>
      <I18nProvider namespaces={["report", "common"]}>
        <Suspense fallback={<GenerateProjectPotentialDelayReport.Loading />}>
          <GenerateProjectPotentialDelayReport />
        </Suspense>
      </I18nProvider>
    </>
  );
};
export default ProjectPotentialDelayReport;
