import React from "react";
import style from "./index.less";
import WrapModalTitle from "./WrapModalTitle";
import WrapModalTable from "./WrapModalTable";
import WrapModalTableSon from "./WrapModalTableSon";
import WrapModalRight from "./WrapModalRight";
import { dragBox } from '@utils/drag';

class WrapModalBody extends React.Component {
  constructor(props) {
    super(props)
  }

  showInIcss(){
    const {showInIcss,closeInIcss} = this.props
    closeInIcss&&closeInIcss()
    showInIcss&&showInIcss();
    dragBox('previewWrapper', 'previewStatic', 'del')
  }
  render() {
    const { btnMsg,handleSearch, hospitalInspect,height,selectOneCheck, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImportIns,allCheck,checkedList,selectGroupList } = this.props;
    return <div className={style['container']}>
      <div className={`${style.left}`}>
        <WrapModalTitle handleSearch={handleSearch} message={message}></WrapModalTitle>
        <WrapModalTable
          hospitalInspect={hospitalInspect}
          handleGetSonList={handleGetSonList}
        ></WrapModalTable>
        {
          hospitalSonInspect && hospitalSonInspect.lisExcelWrapper?
          <WrapModalTableSon
            allCheck={allCheck}
            checkedList={checkedList}
            selectWaring={selectWaring}
            allCheckImportIns={allCheckImportIns}
            selectOneCheck={selectOneCheck}
            selectGroupList={selectGroupList}
            hospitalSonInspect={hospitalSonInspect}
            btnMsg={btnMsg}
          ></WrapModalTableSon>:null
        }
      </div>
      <div className={`${style.right}`}>
        <WrapModalRight showInIcss={this.showInIcss.bind(this)} height={height} selectGroupList={selectGroupList}></WrapModalRight>
      </div>
    </div>
  }
}

export default WrapModalBody;
