'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 }; }

var VIEWER_WINDOW_NAME = exports.VIEWER_WINDOW_NAME = undefined;

var getReportViewerPath = exports.getReportViewerPath = function getReportViewerPath(reportItem, config, recordType, csid) {
  var basename = config.basename;


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

  var params = {
    csid: csid,
    recordType: recordType
  };

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