import { defineComponent, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, createSlots, renderList, withCtx, renderSlot } from "vue";
import _sfc_main$1 from "./refConfigList/refConfig_bgImg.mjs";
import _sfc_main$3 from "./refConfigList/refConfig_img.mjs";
import _sfc_main$2 from "./refConfigList/refConfig_number.mjs";
import refConfig_text from "./refConfigList/refConfig_text.mjs";
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "refConfig",
  props: {
    config: {
      type: Object,
      required: true
    },
    type: {
      type: String,
      require: true
    },
    showImg: {
      type: Boolean,
      default: () => true
    }
  },
  setup(__props) {
    const props = __props;
    const currentComponent = computed(() => {
      switch (props.type) {
        case "text":
          return refConfig_text;
        case "img":
          return _sfc_main$3;
        case "number":
          return _sfc_main$2;
        case "bgImg":
          return _sfc_main$1;
      }
    });
    return (_ctx, _cache) => {
      return openBlock(), createBlock(resolveDynamicComponent(unref(currentComponent)), mergeProps({
        config: __props.config,
        showImg: __props.showImg
      }, _ctx.$attrs), createSlots({ _: 2 }, [
        renderList(_ctx.$slots, (item, key, index) => {
          return {
            name: key,
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, key)
            ])
          };
        })
      ]), 1040, ["config", "showImg"]);
    };
  }
});
export { _sfc_main as default };
