import { Metadata } from "next";
import { Suspense } from "react";
import { I18nProvider, getServerI18n } from "@/i18n";
import GenerateProjectMonthlyReport from "@/components/GenerateProjectMonthlyReport";
import { Typography } from "@mui/material";

export const metadata: Metadata = {
    title: "Project Manhour Summary Daily Report",
};

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

    return (
        <>
        <Typography variant="h4" marginInlineEnd={2}>
            {t("Project Manhour Summary Daily Report")}
          </Typography>
            <I18nProvider namespaces={["report", "common"]}>
                <Suspense fallback={<GenerateProjectMonthlyReport.Loading />}>
                    <GenerateProjectMonthlyReport />
                </Suspense>
            </I18nProvider>
        </>
    );
};

export default ProjectMonthlyReport;
