import React, { useState } from 'react';
import { Input, message, Form, Modal } from 'antd';

function RejectModal(props) {
  const { visible, onOk, onCancel, loading } = props;
  const [form] = Form.useForm();
  const [type, setType] = useState({});
  const handleOk = () => {
    form.validateFields().then((values) => {
      onOk(values);
    });
  };

  return (
    <Modal
      title="是否确认拒绝"
      open={visible}
      confirmLoading={loading}
      onCancel={onCancel}
      maskClosable={false}
      onOk={handleOk}
      destroyOnClose
    >
      <Form labelCol={{ span: 4 }} wrapperCol={{ span: 16 }} form={form}>
        <Form.Item label="拒绝理由" name="desc">
          <Input.TextArea />
        </Form.Item>
      </Form>
    </Modal>
  );
}

export default RejectModal;
