"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"]),
      o = t.getIn(["SEC_USER", "needRefreshTable"]),
      e = t.getIn(["SEC_USER", "tableList"]) || {},
      t = t.getIn(["SEC_USER", "superiorCompanyList"]) || {};
    return {
      userInfo: r,
      departmentTreeData: n,
      allRole: a,
      totals: e.totals,
      dataList: e.dataList,
      superiorCompanyList: t,
      needRefreshTable: o
    }
  },
  actionCreators = function(t, r, n) {
    return Object.keys(t).map(function(e) {
      return t[e] = r(t[e], n)
    }), t
  },
  mapDispatch2Props = function(e, t) {
    return actionCreators(t, _redux.bindActionCreators, e)
  },
  userConnect = function(t) {
    return function(e) {
      return (0, _reactRedux.connect)(mapState2Props, function(e) {
        return mapDispatch2Props(e, userAction(t))
      })(e)
    }
  },
  _default = userConnect;
exports.default = userConnect, module.exports = exports.default;
