'use strict';

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

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

var _MediaViewerPanel = require('../../components/media/MediaViewerPanel');

var _MediaViewerPanel2 = _interopRequireDefault(_MediaViewerPanel);

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

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

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

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


  return {
    searchResult: (0, _reducers.getSearchResult)(state, name, searchDescriptor)
  };
};

const mapDispatchToProps = {
  search: _search.search
};

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