import React from "react";
import { getInitialValues, getValidationSchema } from "./formUtil";
import { ModalEnum } from "../../../../enums/Model";
import { QueryStatusEnum } from "../../../../enums/QueryStatus";
import LayoutModel from "./LayoutModel";
import ModelBody from "./ModelBody";
import { useObjectToEdit } from "../../../../zustand/ObjectToEditState";

const AddModel: React.FC = () => {
  const { objectToEdit } = useObjectToEdit();
  const handleSubmit = () => {};

  return (
    <>
      <LayoutModel
        status={objectToEdit?.status as QueryStatusEnum}
        ModelEnum={ModalEnum.Sales_ADD}
        handleSubmit={handleSubmit}
        getInitialValues={getInitialValues(objectToEdit)}
        getValidationSchema={getValidationSchema}
        canClearObjectToEdit = {false}
        width="70%"
      >
        <ModelBody />
      </LayoutModel>
    </>
  );
};

export default AddModel;
