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 { handleSearchs,msgObj,hospitalPac,height,selectOneCheck, handleGetSonList,selectWaring,message, hospitalSonInspect,allCheckImport,allCheck,checkedList,selectGroupList } = this.props;
    return <div className={style['container']}>
      <div className={`${style.left}`}>
        <WrapModalTitle handleSearch={handleSearchs} message={message}></WrapModalTitle>
        <WrapModalTable
          hospitalPac={hospitalPac}
          msgObj={msgObj}
          handleGetSonList={handleGetSonList}
        ></WrapModalTable>
        {
          hospitalSonInspect && hospitalSonInspect.pacsResultDTO?
          <WrapModalTableSon
            allCheckImport={allCheckImport}
            allCheck={allCheck}
            hospitalSonInspect={hospitalSonInspect}
            selectGroupList={selectGroupList}
            checkedList={checkedList}
            selectOneCheck={selectOneCheck}
            selectWaring={selectWaring}
          ></WrapModalTableSon>:null
        }
      </div>
      <div className={`${style.right}`}>
        <WrapModalRight showInIcss={this.showInIcss.bind(this)} height={height} selectGroupList={selectGroupList}></WrapModalRight>
      </div>
    </div>
  }
}

export default WrapModalBody;
