import React, { Component } from "react";
import style from "../index.less";
import close from '../../../common/images/icon_close.png'
import { dragBox } from '@utils/tools';

class DiscontentSon extends Component {
  constructor(props) {
    super(props);
  }
  componentDidMount(){
    dragBox('disContentWrap','DisclatmerTitle')
  }

  render() {
    const { closeDisclatmerModal,disVisible,disclatmerContent } = this.props;

    return <div
          className={style["disModal"]}
          style={disVisible ? { display: "block" } : { display: "none" }}
        >
          <div className={style["shade"]} onClick={closeDisclatmerModal}/>
          <div className={style["disContent"]} id="disContentWrap">
            <div className={`${style["header"]} drag-title`} id="DisclatmerTitle">免责声明<img src={close} onClick={closeDisclatmerModal} /></div>
            <div className={style["content"]}>{disclatmerContent}</div>
            <div className={style["btnBox"]}><span  className={style["btn"]} onClick={closeDisclatmerModal}>确定</span></div>
          </div>
      </div>
  }
}

export default DiscontentSon;
