Files
appco_dist/.output/server/chunks/build/Logo-CS_PsVSS.mjs
T

47 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-02-23 12:50:59 +03:30
import { defineComponent, computed, ref, watch, unref, mergeProps, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate } from 'vue/server-renderer';
2026-01-27 16:02:45 +03:30
import { a as useConfigStore } from './server.mjs';
const _sfc_main = /* @__PURE__ */ defineComponent({
2026-02-22 12:27:05 +03:30
__name: "Logo",
2026-01-27 16:02:45 +03:30
__ssrInlineRender: true,
setup(__props) {
const config = useConfigStore();
2026-02-22 12:27:05 +03:30
const logoSrc = computed(() => {
if (!config.STORAGE_LOGO) {
console.warn("⚠️ STORAGE_LOGO is empty");
return "";
}
const logo = config.isNightStore ? "logo_full_white.png" : "logo_full.png";
const fullPath = config.useLogo(logo);
console.log("🖼️ Logo computed:", fullPath);
return fullPath;
});
ref(false);
watch(() => config.STORAGE_LOGO, (newVal) => {
console.log("🔄 STORAGE_LOGO changed:", newVal);
2026-01-27 16:02:45 +03:30
});
return (_ctx, _push, _parent, _attrs) => {
2026-02-22 12:27:05 +03:30
if (!logoSrc.value) {
2026-01-27 16:02:45 +03:30
_push(`<span${ssrRenderAttrs(_attrs)}>${ssrInterpolate(unref(config).appName.en)}</span>`);
} else {
_push(`<img${ssrRenderAttrs(mergeProps({
2026-02-22 12:27:05 +03:30
key: logoSrc.value,
2026-01-27 16:02:45 +03:30
src: logoSrc.value,
alt: unref(config).appName.en,
class: "inline"
}, _attrs))}>`);
}
};
}
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
const ssrContext = useSSRContext();
2026-02-22 12:27:05 +03:30
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/Logo.vue");
2026-01-27 16:02:45 +03:30
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
2026-02-22 12:27:05 +03:30
const Logo = Object.assign(_sfc_main, { __name: "Logo" });
2026-01-27 16:02:45 +03:30
2026-02-22 12:27:05 +03:30
export { Logo as L };