"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.closeFullscreen = exports.OkrTypeSetting = void 0;
exports.getBSGlobal = getBSGlobal;
exports.tenantName = exports.tenantLogo = exports.openFullscreen = exports.okrTypeMap = void 0;

var _getBSGlobal2, _getBSGlobal3;

var openFullscreen = function openFullscreen() {
  // 隐藏侧边栏和头部
  // if (!getBSGlobal("tenantInfo")?.isNewIndex) {
  if (document.querySelector(".tu-page-nav")) {
    document.querySelector(".tu-page-nav").style.display = "none";
  }

  if (document.querySelector(".tu-page-header")) {
    document.querySelector(".tu-page-header").style.display = "none";
  }

  if (document.querySelector('.titaui-nav-top__version')) {
    document.querySelector(".titaui-nav-top__version").style.display = "none";
  } // }

};

exports.openFullscreen = openFullscreen;

var closeFullscreen = function closeFullscreen() {
  var _getBSGlobal;

  if (!((_getBSGlobal = getBSGlobal("tenantInfo")) !== null && _getBSGlobal !== void 0 && _getBSGlobal.isNewIndex)) {
    if (document.querySelector(".tu-page-nav")) {
      document.querySelector(".tu-page-nav").style.display = "block";
    }

    if (document.querySelector(".tu-page-header")) {
      document.querySelector(".tu-page-header").style.display = "block";
    }
  }

  if (document.querySelector('.titaui-nav-top__version')) {
    document.querySelector(".titaui-nav-top__version").style.display = "block";
  }
};

exports.closeFullscreen = closeFullscreen;

function getBSGlobal(name) {
  return name ? BSGlobal && BSGlobal[name] : BSGlobal;
}

var tenantName = ((_getBSGlobal2 = getBSGlobal("tenantInfo")) === null || _getBSGlobal2 === void 0 ? void 0 : _getBSGlobal2.Name) || "";
exports.tenantName = tenantName;
var tenantLogo = ((_getBSGlobal3 = getBSGlobal("tenantInfo")) === null || _getBSGlobal3 === void 0 ? void 0 : _getBSGlobal3.Logo) || "";
exports.tenantLogo = tenantLogo;

var _ref = getBSGlobal("OkrAdvancedSetting") || {},
    KRSetting = _ref.KRSetting; // KRSetting


var OkrTypeSetting = (KRSetting || {}).OkrTypeSetting || false; // 是否开启目标类型 true | false

exports.OkrTypeSetting = OkrTypeSetting;
var okrTypeMap = {
  company: 3,
  depart: 2,
  group: 4,
  user: 1
};
exports.okrTypeMap = okrTypeMap;