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

export const metadata: Metadata = {
    title: "Staff Monthly Work Hours Analysis Report",
};

const StaffMonthlyWorkHoursAnalysisReport: React.FC = async () => {
    const { t } = await getServerI18n("User Group");

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

export default StaffMonthlyWorkHoursAnalysisReport;
