"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.ConnectedExportViewerPage = void 0;

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

var _ExportViewerPage = _interopRequireDefault(require("../../components/pages/ExportViewerPage"));

var _withConfig = _interopRequireDefault(require("../../enhancers/withConfig"));

var _export = require("../../actions/export");

var _invocationHelpers = require("../../helpers/invocationHelpers");

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

const mapDispatchToProps = (dispatch, ownProps) => ({
  readContent: () => {
    // const invocationDescriptorObject = qs.parse(location.search, { ignoreQueryPrefix: true });
    // const invocationDescriptor = Immutable.fromJS(invocationDescriptorObject);
    const invocationDescriptor = (0, _invocationHelpers.loadInvocationDescriptor)(true);
    return dispatch((0, _export.invoke)(ownProps.config, invocationDescriptor));
  }
});

const ConnectedExportViewerPage = (0, _reactRedux.connect)(undefined, mapDispatchToProps)(_ExportViewerPage.default);
exports.ConnectedExportViewerPage = ConnectedExportViewerPage;

var _default = (0, _withConfig.default)(ConnectedExportViewerPage);

exports.default = _default;