import React from "react";
import GenerateEX02ProjectCashFlowReportLoading from "./GenerateEX02ProjectCashFlowReportLoading";
import { fetchProjects } from "@/app/api/projects";
import GenerateEX02ProjectCashFlowReport from "./GenerateEX02ProjectCashFlowReport";

interface SubComponents {
  Loading: typeof GenerateEX02ProjectCashFlowReportLoading;
}

const GenerateEX02ProjectCashFlowReportWrapper: React.FC & SubComponents = async () => {
  const projects = await fetchProjects();

  return <GenerateEX02ProjectCashFlowReport projects={projects} />;
};

GenerateEX02ProjectCashFlowReportWrapper.Loading = GenerateEX02ProjectCashFlowReportLoading;

export default GenerateEX02ProjectCashFlowReportWrapper;