import React from 'react';
import { connect } from 'react-redux';
import MixCheckBox from '@commonComp/MixCheckBox';
import {CONFIRN_CHECKBOX,CLEAR_CHECKBOX,SHOW_CHECKBOX,CHECKED,FIRST,THEN,NOSPECIAL,RADIO} from '@store/types/checkBox';
import {SHOW_MIXBOX} from '@store/types/currentIll';


function mapStateToProps(state){
  return{
    // showCheckBox:state.mixCheckBox.showCheckBox,//是否展示下拉框
    selectVal:state.mixCheckBox.selectVal,//多选选中的值
    // radioVals:state.mixCheckBox.radioVals,//选中的值
    radioFlag:state.mixCheckBox.radioFlag,//防止点击单选项不更新
    // noSpecial:state.mixCheckBox.noSpecial,//无殊选中
    noSpecialFlag:state.mixCheckBox.noSpecialFlag,//互斥
    // showDrop:state.mixCheckBox.showDrop,
    mixDatas:state.mixCheckBox.zayin,
    updateDrop:state.mainSuit.showDrop
  }
}


function mapDispatchToProps (dispatch){
  return{
    /*handleCheckBoxClick:(info)=>{//点击复选框标签
        dispatch({
          type:CHECKED,
          value:info
        })
      },
    showMixBox:(info)=>{//点击症状标签
      dispatch({
        type:SHOW_MIXBOX,
        showCheckBox:info
      })
    },
    clearCheckBox:(info)=>{//清空
      dispatch({
        type:CLEAR_CHECKBOX,
        checkBoxId:info
      })
    },
    confirmCheckBox:(info)=>{//确定
      dispatch({
        type:CONFIRN_CHECKBOX,
        checkBoxId:info
      })
    },
    handleRadioClick:(info)=>{//点击复选框标签
        dispatch({
          type:RADIO,
          id:info.id,
          parentId:info.parentId
        })
      },
    noSpecialClick:(name)=>{//点击无殊
      dispatch({
        type:NOSPECIAL,
        name
      })
    }*/
  }
}


const MixCheckBoxContainer = connect(
    mapStateToProps,
    mapDispatchToProps
)(MixCheckBox);
export default MixCheckBoxContainer;
