import { defineComponent, computed, mergeProps, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderClass, ssrRenderList, ssrInterpolate, ssrIncludeBooleanAttr, ssrRenderAttr } from 'vue/server-renderer'; import { L as LANG_OPTIONS, l as langName } from './useLangOptions-DMhiAuTa.mjs'; import { _ as _export_sfc } from './server.mjs'; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "LangSelect", __ssrInlineRender: true, props: { modelValue: {}, multiple: { type: Boolean, default: false }, disabled: { type: Boolean, default: false }, options: { default: void 0 } }, emits: ["update:modelValue"], setup(__props, { emit: __emit }) { const props = __props; const opts = computed(() => props.options && props.options.length ? props.options : LANG_OPTIONS); const selected = computed( () => (props.modelValue || "").split(",").map((s) => s.trim()).filter(Boolean) ); function nameOf(code) { return langName(code); } return (_ctx, _push, _parent, _attrs) => { _push(``); if (__props.multiple) { _push(`
`); ssrRenderList(selected.value, (code) => { _push(`${ssrInterpolate(code)}${ssrInterpolate(nameOf(code))}`); }); _push(``); if (!selected.value.length) { _push(`未选择语言`); } else { _push(``); } _push(`
`); if (!__props.disabled) { _push(`
+ 选择语言(已选 ${ssrInterpolate(selected.value.length)})
`); ssrRenderList(opts.value, (o) => { _push(``); }); _push(`
`); } else { _push(``); } _push(``); } else { _push(``); } _push(``); }; } }); const _sfc_setup = _sfc_main.setup; _sfc_main.setup = (props, ctx) => { const ssrContext = useSSRContext(); (ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/LangSelect.vue"); return _sfc_setup ? _sfc_setup(props, ctx) : void 0; }; const __nuxt_component_0 = /* @__PURE__ */ Object.assign(_export_sfc(_sfc_main, [["__scopeId", "data-v-4903af59"]]), { __name: "LangSelect" }); export { __nuxt_component_0 as _ }; //# sourceMappingURL=LangSelect-C_QPlcDf.mjs.map