"use strict";

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = void 0;

var _redux = require("redux"), _reactRedux = require("react-redux"), mapState2Props = function(e) {
  var t = e.userReducer, r = t.getIn([ "SEC_USER", "userInfo" ]), n = t.getIn([ "SEC_USER", "departmentTreeData" ]), a = t.getIn([ "SEC_USER", "allRole" ]), u = t.getIn([ "SEC_USER", "needRefreshTable" ]), o = t.getIn([ "SEC_USER", "tableList" ]) || {}, s = t.getIn([ "SEC_USER", "superiorCompanyList" ]) || {};
  return {
    userInfo: r,
    departmentTreeData: n,
    allRole: a,
    totals: o.totals,
    dataList: o.dataList,
    superiorCompanyList: s,
    needRefreshTable: u
  };
}, actionCreators = function(e, t, r) {
  return Object.keys(e).map((function(n) {
    return e[n] = t(e[n], r);
  })), e;
}, mapDispatch2Props = function(e, t) {
  return actionCreators(t, _redux.bindActionCreators, e);
}, userConnect = function(e) {
  return function(t) {
    return (0, _reactRedux.connect)(mapState2Props, (function(t) {
      return mapDispatch2Props(t, userAction(e));
    }))(t);
  };
}, _default = userConnect;

exports.default = _default;