'use strict';

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

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

var _get = require('lodash/get');

var _get2 = _interopRequireDefault(_get);

var _ContentViewerPage = require('../../components/pages/ContentViewerPage');

var _ContentViewerPage2 = _interopRequireDefault(_ContentViewerPage);

var _media = require('../../actions/media');

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

var mapDispatchToProps = {
  readContent: function readContent(location, match) {
    var contentPath = (0, _get2.default)(match, ['params', 'contentPath']);

    return (0, _media.readBinary)(contentPath);
  }
};

exports.default = (0, _reactRedux.connect)(undefined, mapDispatchToProps)(_ContentViewerPage2.default);