'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.getReportViewerPath = exports.VIEWER_WINDOW_NAME = undefined;

var _qs = require('qs');

var _qs2 = _interopRequireDefault(_qs);

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

const VIEWER_WINDOW_NAME = exports.VIEWER_WINDOW_NAME = undefined;

const getReportViewerPath = exports.getReportViewerPath = (reportItem, config, recordType, csid) => {
  const basename = config.basename;


  const reportCsid = reportItem.get('csid');

  const params = {
    csid,
    recordType
  };

  return `${basename || ''}/report/${reportCsid}?${_qs2.default.stringify(params)}`;
};