import React from "react";
import { Form } from "@ant-design/compatible";
import "@ant-design/compatible/assets/index.css";
import AntdDraggableModal from "@/components/Common/AntdDraggableModal";
import FaceDetect from '@/components/FaceDetect';
import * as commonFunc from "@/components/Common/commonFunc";
import styles from "@/routes/indexPage.less";

const PersonCenterAddFace = Form.create({
  mapPropsToFields(props) {},
})(props => {
  const { onCancel, handleModalClose, addFaceVisible } = props;
  const GetFace = commonFunc.showMessage(props.app.commonConst, "GetFace"); /* 在线用户 */
  return (
    <div>
      {
        <AntdDraggableModal
          title={GetFace}
          width={400}
          visible={addFaceVisible}
          onCancel={onCancel}
          afterClose={handleModalClose}
          footer={null}
          className={styles.changePwd}
        >
          <div className="tab-container">
            <FaceDetect {...props} bClickSource = 'BtnAddFace' actionType="saveFace" onSaveFaceSuccess={props.onSaveFaceSuccess}>
              11
            </FaceDetect>
          </div>
        </AntdDraggableModal>
      }
    </div>
  );
});

export default PersonCenterAddFace;
