'use strict';

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

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

var _SearchResultPage = require('../../components/pages/SearchResultPage');

var _SearchResultPage2 = _interopRequireDefault(_SearchResultPage);

var _searchPage = require('../../actions/searchPage');

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

var _search = require('../../actions/search');

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

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

var mapStateToProps = function mapStateToProps(state) {
  return {
    perms: (0, _reducers.getUserPerms)(state),
    preferredPageSize: (0, _reducers.getSearchResultPagePageSize)(state),
    selectedItems: (0, _reducers.getSearchSelectedItems)(state, _SearchResultPage.searchName)
  };
};

var mapDispatchToProps = {
  search: _search.search,
  setSearchPageAdvanced: _searchPage.setSearchPageAdvanced,
  setSearchPageKeyword: _searchPage.setSearchPageKeyword,
  setPreferredPageSize: _prefs.setSearchResultPagePageSize,
  setAllItemsSelected: _search.setAllResultItemsSelected,
  onItemSelectChange: _search.setResultItemSelected
};

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