"use strict";

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

var _axios = _interopRequireDefault(require("axios"));

var _BSGlobal$tenantInfo, _BSGlobal$loginUserIn;

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

var tenantId = BSGlobal && ((_BSGlobal$tenantInfo = BSGlobal.tenantInfo) === null || _BSGlobal$tenantInfo === void 0 ? void 0 : _BSGlobal$tenantInfo.Id) || 0;
var userId = BSGlobal && ((_BSGlobal$loginUserIn = BSGlobal.loginUserInfo) === null || _BSGlobal$loginUserIn === void 0 ? void 0 : _BSGlobal$loginUserIn.Id) || 0;

var requestDomain = function requestDomain() {
  if (!window.location.hostname.match(/dev/)) return "";
  return "http://www.tita.gift";
};

var getWords = function getWords() {
  return _axios["default"].get("".concat(requestDomain(), "/api/v1/").concat(tenantId, "/").concat(userId, "/wordCloud/get?num=250")).then(function (words) {
    return words.data;
  });
};

exports.getWords = getWords;