import { defineComponent, computed, openBlock, createElementBlock, unref, createCommentVNode, createElementVNode, toDisplayString } from 'vue';
import { storeToRefs } from 'pinia';
import '../../../../stores/index.mjs';
import '../../../../utils/index.mjs';
import { useThemeConfig } from '../../../../stores/themeConfig.mjs';
import { showFileUrl } from '../../../../utils/uploadfileurl.mjs';

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

export { _sfc_main as default };
