"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
;/* empty css                                               */
const Vue = require("vue");
;/* empty css               */
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
const index = require("../../../../node_modules/vant/es/collapse/index.js");
const _sfc_main = {
  __name: "Collapse",
  props: {
    modelValue: {
      type: String,
      default: ""
    },
    autoHeight: {
      //高度自适应
      type: Boolean,
      default: true
    },
    height: {
      //高度
      type: String,
      default: "300"
    }
  },
  emits: ["update:modelValue"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const activeName = Vue.computed({
      get: () => {
        return props.modelValue;
      },
      set: (val) => {
        emit("update:modelValue", val);
      }
    });
    const compHeight = Vue.computed(() => {
      if (props.autoHeight) {
        return "100%";
      } else {
        return props.height + "px";
      }
    });
    return (_ctx, _cache) => {
      const _component_van_collapse = index.Collapse;
      return Vue.openBlock(), Vue.createElementBlock("div", {
        class: "fec-collapse-container",
        style: Vue.normalizeStyle("height:" + Vue.unref(compHeight))
      }, [
        Vue.createVNode(_component_van_collapse, Vue.mergeProps(_ctx.$attrs, {
          class: "fec-collapse",
          modelValue: Vue.unref(activeName),
          "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => Vue.isRef(activeName) ? activeName.value = $event : null)
        }), Vue.createSlots({ _: 2 }, [
          Vue.renderList(_ctx.$slots, (item, key) => {
            return {
              name: key,
              fn: Vue.withCtx(() => [
                Vue.renderSlot(_ctx.$slots, key, {}, void 0, true)
              ])
            };
          })
        ]), 1040, ["modelValue"])
      ], 4);
    };
  }
};
const _Collapse = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-6037566c"]]);
exports.default = _Collapse;
