"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _redux = require("redux"), _reactRedux = require("react-redux"), _company = _interopRequireDefault(require("./../../model/company")), mapState2Props = function(e) {
  var t = e.companyReducer, r = t.getIn([ "SEC_COMPANY", "companyLevels" ]), n = t.getIn([ "SEC_COMPANY", "superiorCompanyList" ]), o = t.getIn([ "SEC_COMPANY", "editSuperiorCompanyList" ]), a = t.getIn([ "SEC_COMPANY", "tableList" ]);
  return {
    companyLevels: r,
    superiorCompanyList: n,
    editSuperiorCompanyList: o,
    companyInfo: t.getIn([ "SEC_COMPANY", "companyInfo" ]),
    tableList: a,
    needRefreshTable: t.getIn([ "SEC_COMPANY", "needRefreshTable" ])
  };
}, 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);
}, companyConnect = function(e) {
  return function(t) {
    return (0, _reactRedux.connect)(mapState2Props, (function(t) {
      return mapDispatch2Props(t, (0, _company.default)(e));
    }))(t);
  };
}, _default = companyConnect;

exports.default = _default;