'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var pinia = require('pinia');
require('../../../../stores/index.js');
require('../../../../utils/index.js');
var themeConfig = require('../../../../stores/themeConfig.js');
var uploadfileurl = require('../../../../utils/uploadfileurl.js');

const _hoisted_1 = ["src"];
const _hoisted_2 = ["src"];
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  __name: "index",
  setup(__props) {
    const storesThemeConfig = themeConfig.useThemeConfig();
    const { themeConfig: themeConfig$1 } = pinia.storeToRefs(storesThemeConfig);
    const setShowLogo = vue.computed(() => {
      let { isCollapse, layout } = themeConfig$1.value;
      return !isCollapse || layout === "classic" || document.body.clientWidth < 1e3;
    });
    const showLogo = vue.computed(() => {
      let { layout } = themeConfig$1.value;
      return layout !== "columns";
    });
    const onThemeConfigChange = () => {
      if (themeConfig$1.value.layout === "transverse") return false;
      themeConfig$1.value.isCollapse = !themeConfig$1.value.isCollapse;
    };
    return (_ctx, _cache) => {
      return setShowLogo.value ? (vue.openBlock(), vue.createElementBlock("div", {
        key: 0,
        class: "layout-logo",
        onClick: onThemeConfigChange
      }, [
        showLogo.value ? (vue.openBlock(), vue.createElementBlock("img", {
          key: 0,
          src: vue.unref(uploadfileurl.showFileUrl)(vue.unref(themeConfig$1).logoUrl),
          class: "layout-logo-medium-img"
        }, null, 8, _hoisted_1)) : vue.createCommentVNode("v-if", true),
        vue.createElementVNode(
          "span",
          null,
          vue.toDisplayString(vue.unref(themeConfig$1).globalTitle),
          1
          /* TEXT */
        )
      ])) : (vue.openBlock(), vue.createElementBlock("div", {
        key: 1,
        class: "layout-logo-size",
        onClick: onThemeConfigChange
      }, [
        vue.createElementVNode("img", {
          src: vue.unref(uploadfileurl.showFileUrl)(vue.unref(themeConfig$1).logoUrl),
          class: "layout-logo-size-img"
        }, null, 8, _hoisted_2)
      ]));
    };
  }
});

exports.default = _sfc_main;
