import { defineComponent, computed, mergeProps, unref, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrRenderList, ssrRenderClass, ssrRenderAttr, ssrInterpolate } from 'vue/server-renderer';
import { _ as _export_sfc, u as useI18n } from './server.mjs';

const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "LangSwitcher",
  __ssrInlineRender: true,
  setup(__props) {
    const { locale, locales, setLocale } = useI18n();
    const availableLocales = computed(() => {
      return locales.value;
    });
    const currentLocale = computed(() => locale.value);
    return (_ctx, _push, _parent, _attrs) => {
      _push(`<div${ssrRenderAttrs(mergeProps({ class: "lang-switcher" }, _attrs))} data-v-2d84a2aa><!--[-->`);
      ssrRenderList(unref(availableLocales), (loc) => {
        _push(`<button class="${ssrRenderClass([{ active: unref(currentLocale) === loc.code }, "lang-btn"])}"${ssrRenderAttr("title", loc.name)} data-v-2d84a2aa>${ssrInterpolate(loc.code.toUpperCase())}</button>`);
      });
      _push(`<!--]--></div>`);
    };
  }
});
const _sfc_setup = _sfc_main.setup;
_sfc_main.setup = (props, ctx) => {
  const ssrContext = useSSRContext();
  (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/LangSwitcher.vue");
  return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const __nuxt_component_1 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main, [["__scopeId", "data-v-2d84a2aa"]]), { __name: "LangSwitcher" });

export { __nuxt_component_1 as _ };
//# sourceMappingURL=LangSwitcher-BcmlkZkS.mjs.map
