import React, { useState } from "react";
import { Modal } from "antd";
import { useModalState } from "../../../../zustand/Modal";
import FormikForm from "../../../../Layout/Dashboard/FormikForm";
import * as Yup from "yup";
import ModelBody from "./ModelBody";
import TabsSubmite from "../../../../Components/Layout/Tabs/TabsSubmite";
import { getInitialValues, getValidationSchema } from "./formUtil";
import { ModalEnum } from "../../../../enums/Model";

const ModalForm: React.FC = () => {
  const { isOpen, setIsOpen } = useModalState((state) => state);

  return (
    <>
      <Modal
        className="AddModalForm"
        centered
        width={"80vw"}
        footer={null}
        open={isOpen === ModalEnum.STUDENT_ADD}
        onOk={() => setIsOpen("")}
        onCancel={() => setIsOpen("")}
      >
        <FormikForm
          handleSubmit={() => {}}
          initialValues={getInitialValues}
          validationSchema={getValidationSchema}
        >
          <ModelBody />
          {/* <TabsSubmite steps={5} /> */}
        </FormikForm>
      </Modal>
    </>
  );
};

export default ModalForm;
