//src\app\(main)\analytics\CostandExpenseReport\page.tsx
import { Metadata } from "next";
import { I18nProvider, getServerI18n } from "@/i18n";
import Typography from "@mui/material/Typography";
import { Suspense } from "react";
import CostAndExpenseReport from "@/components/CostAndExpenseReport";

export const metadata: Metadata = {
  title: "Cost and Expense Report",
};

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

  return (
    <>
      <Typography variant="h4" marginInlineEnd={2}>
        {t("Cost and Expense Report")}
      </Typography>
      <I18nProvider namespaces={["analytics"]}>
        <Suspense fallback={<CostAndExpenseReport.Loading />}>
          <CostAndExpenseReport />
        </Suspense>
      </I18nProvider>
    </>
  );
};
export default CostandExpenseReport;
