import { fetchProjectsLateStart } from "@/app/api/report";
import React from "react";
import LateStartReportGen from "./LateStartReportGen";
import LateStartReportGenLoading from "./LateStartReportGenLoading";
import { fetchAllCustomers } from "@/app/api/customer";

interface SubComponents {
  Loading: typeof LateStartReportGenLoading;
}

const LateStartReportGenWrapper: React.FC & SubComponents = async () => {
  const clentprojects = await fetchProjectsLateStart();
  const customers = await fetchAllCustomers();

  return <LateStartReportGen projects={clentprojects} customers={customers}/>;
};

LateStartReportGenWrapper.Loading = LateStartReportGenLoading;

export default LateStartReportGenWrapper;