import React,{Component} from 'react';
import {InlineTag,MixCheckBox} from '@commonComp';
import style from './index.less';

class MixMultCheck extends Component{
  constructor(props){
    super(props);
    this.handleShow = this.handleShow.bind(this);
  }
  getStyle(){
    return style['container'];
  }
  handleShow(e){
    e.stopPropagation();
    const {minCheckBoxShow,i,boxMark} = this.props;
    const showInx = boxMark+i+'0';
    minCheckBoxShow&&minCheckBoxShow({ikey:showInx});
  }
  render(){
    const v = this.props.item;
    const {showArr,i,boxMark,totalHide} = this.props;
    const showInx = boxMark+i+'0';
    return <div className={this.getStyle()}>
              <span onClick={this.handleShow}>{v.name}</span>
               <MixCheckBox datas={v.questionMapping}
                     showDrop={!totalHide&&(showArr&&showArr[showInx])}
                     checkBoxId={v.id}
                     confirmCheckBox={null}
                     clearCheckBox={null}
                     noSpecialClick={null}
                     handleRadioClick={null}
                     handleCheckBoxClick={null}
                     noSpecial={false}
                     noSpecialFlag={false} />
        </div>;
  }
}

export default MixMultCheck;