// import { fetchAllTasks, fetchTaskTemplates } from "@/app/api/tasks";
// import CreateProject from "./CreateProject";
// import { fetchProjectCategories } from "@/app/api/projects";
// import { fetchTeamLeads } from "@/app/api/staff";
import { fetchCustomerTypes, fetchAllSubsidiaries, getMaxCustomerCode } from "@/app/api/customer";
import CustomerSave from "./CustomerSave";

// type Props = {
//   params: {
//     id: string | undefined;
//   };
// };

const CustomerSaveWrapper: React.FC = async () => {
  // const { params } = props
  // console.log(params)
  const [subsidiaries, customerTypes, maxCustomerCode] =
    await Promise.all([
      fetchAllSubsidiaries(),
      fetchCustomerTypes(),
      getMaxCustomerCode()  
    ]);

  return (
    <CustomerSave subsidiaries={subsidiaries} customerTypes={customerTypes} maxCustomerCode={maxCustomerCode} />
  );
};

export default CustomerSaveWrapper;
