import { fetchAllSubsidiaries, preloadAllCustomers } from "@/app/api/customer";
import CustomerSave from "@/components/CustomerSave";
// import { preloadAllTasks } from "@/app/api/tasks";
import CreateTaskTemplate from "@/components/CreateTaskTemplate";
import { I18nProvider, getServerI18n } from "@/i18n";
import Typography from "@mui/material/Typography";
import { Metadata } from "next";

export const metadata: Metadata = {
  title: "Edit Customer",
};

const EditCustomer: React.FC = async () => {
  const { t } = await getServerI18n("customer");
  // fetchAllSubsidiaries();

  return (
    <>
      <Typography variant="h4">{t("Edit Customer")}</Typography>
      <I18nProvider namespaces={["customer", "common"]}>
          <CustomerSave />
      </I18nProvider>
    </>
  );
};

export default EditCustomer;
