"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _SearchResultLink = _interopRequireDefault(require("../../components/search/SearchResultLink"));
var _search = require("../../actions/search");
var _reducers = require("../../reducers");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const mapStateToProps = (state, ownProps) => {
  const {
    searchDescriptor,
    searchName
  } = ownProps;
  return {
    isSearchPending: (0, _reducers.isSearchPending)(state, searchName, searchDescriptor),
    searchResult: (0, _reducers.getSearchResult)(state, searchName, searchDescriptor),
    searchError: (0, _reducers.getSearchError)(state, searchName, searchDescriptor)
  };
};
const mapDispatchToProps = {
  search: _search.search
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_SearchResultLink.default);
exports.default = _default;