"use strict";

function _default(e) {
  var t = document.getElementById("app");
  t.className = e;
  e = "/src/assets/skin/dark/bg-".concat(e, ".jpg");
  t.style.backgroundImage = "url(".concat(e, ")"), t.style.backgroundRepeat = "no-repeat", t.style.backgroundSize = "cover"
}
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = _default, exports.downloadFile = exports.updateLinkCss = void 0;
var updateLinkCss = function(e, t) {
  t = 1 < arguments.length && void 0 !== t ? t : "theme";
  e && 0 <= e.length && ((t = document.getElementById(t)) ? t.setAttribute("href", e) : ((t = document.createElement("link")).setAttribute("rel", "stylesheet"), t.setAttribute("type", "text/css"), t.setAttribute("id", "theme"), t.setAttribute("href", e), ((e = document.getElementsByTagName("head")).length ? e[0] : document.documentElement).appendChild(t)))
};
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), 0 <= navigator.userAgent.indexOf("Firefox") && n.click()
};
exports.downloadFile = downloadFile;
