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

export const metadata: Metadata = {
    title: "Staff Last Record Report",
};

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

    return (
        <>
        <Typography variant="h4" marginInlineEnd={2}>
            {t("Staff Last Record Report")}
          </Typography>
            <I18nProvider namespaces={["report", "common"]}>
                <Suspense fallback={<GenerateLastModifiedReport.Loading />}>
                    <GenerateLastModifiedReport />
                </Suspense>
            </I18nProvider>
        </>
    );
};

export default LastModifiedReport;
