'use strict';

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

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

var _MediaViewer = require('../../components/media/MediaViewer');

var _MediaViewer2 = _interopRequireDefault(_MediaViewer);

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

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

const mapStateToProps = (state, ownProps) => {
  const searchName = ownProps.searchName,
        searchDescriptor = ownProps.searchDescriptor;


  return {
    isSearchPending: (0, _reducers.isSearchPending)(state, searchName, searchDescriptor),
    searchResult: (0, _reducers.getSearchResult)(state, searchName, searchDescriptor),
    searchError: (0, _reducers.getSearchError)(state, searchName, searchDescriptor)
  };
};

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