"use strict";

function _default(e) {
  var t = document.getElementById("app");
  t.className = e;
  var n = "/src/assets/skin/dark/bg-".concat(e, ".jpg");
  t.style.backgroundImage = "url(".concat(n, ")"), t.style.backgroundRepeat = "no-repeat", 
  t.style.backgroundSize = "cover";
}

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = _default, exports.updateLinkCss = exports.downloadFile = void 0;

var updateLinkCss = function(e) {
  var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "theme";
  if (e && e.length >= 0) {
    var n = document.getElementById(t);
    if (n) n.setAttribute("href", e); else {
      var a = document.createElement("link");
      a.setAttribute("rel", "stylesheet"), a.setAttribute("type", "text/css"), a.setAttribute("id", "theme"), 
      a.setAttribute("href", e);
      var d = document.getElementsByTagName("head");
      d.length ? d[0].appendChild(a) : document.documentElement.appendChild(a);
    }
  }
};

exports.updateLinkCss = updateLinkCss;

var downloadFile = function(e, t) {
  var n = document.createElement("a"), a = document.createEvent("MouseEvent");
  a.initEvent("click", !1, !1), n.download = t, n.href = e, n.dispatchEvent(a), navigator.userAgent.indexOf("Firefox") >= 0 && n.click();
};

exports.downloadFile = downloadFile;