'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _reactRedux = require('react-redux');

var _RecordBrowserNavBar = require('../../components/record/RecordBrowserNavBar');

var _RecordBrowserNavBar2 = _interopRequireDefault(_RecordBrowserNavBar);

var _prefs = require('../../actions/prefs');

var _reducers = require('../../reducers');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var mapStateToProps = function mapStateToProps(state, ownProps) {
  var recordType = ownProps.recordType;


  return {
    items: (0, _reducers.getRecordBrowserNavBarItems)(state, recordType),
    perms: (0, _reducers.getUserPerms)(state)
  };
};

var mapDispatchToProps = {
  setItems: _prefs.setRecordBrowserNavBarItems
};

exports.default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_RecordBrowserNavBar2.default);