import { Metadata } from "next";
import { Suspense } from "react";
import { I18nProvider, getServerI18n } from "@/i18n";
import GenerateMonthlyWorkHoursReport from "@/components/GenerateMonthlyWorkHoursReport";
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("report");

    return (
        <>
        <Typography variant="h4" marginInlineEnd={2}>
            {t("Staff Monthly Work Hours Analysis Report")}
          </Typography>
            <I18nProvider namespaces={["report", "common"]}>
                <Suspense fallback={<GenerateMonthlyWorkHoursReport.Loading />}>
                    <GenerateMonthlyWorkHoursReport />
                </Suspense>
            </I18nProvider>
        </>
    );
};

export default StaffMonthlyWorkHoursAnalysisReport;
