"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _reactRedux = require("react-redux");
var _MediaViewer = _interopRequireDefault(require("../../components/media/MediaViewer"));
var _record = require("../../actions/record");
var _reducers = require("../../reducers");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const mapStateToProps = (state, ownProps) => {
  const {
    searchName,
    searchDescriptor
  } = 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 = {
  readRecord: _record.readRecord
};
var _default = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(_MediaViewer.default);
exports.default = _default;