"use strict";

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

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

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

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

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

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

const mapStateToProps = (state, ownProps) => {
  const {
    recordType
  } = ownProps;
  return {
    items: (0, _reducers.getRecordBrowserNavBarItems)(state, recordType),
    perms: (0, _reducers.getUserPerms)(state)
  };
};

const mapDispatchToProps = {
  setItems: _prefs.setRecordBrowserNavBarItems
};

var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_RecordBrowserNavBar.default);

exports.default = _default;