/* empty css                                               */
/* empty css                                                 */
/* empty css                                                */
/* empty css                                               */
/* empty css                                                      */
import { computed, createBlock, openBlock, mergeProps, unref, isRef, withCtx, createElementBlock, renderSlot, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
/* empty css             */
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.mjs";
import { Tabbar } from "../../../../node_modules/vant/es/tabbar/index.mjs";
import { TabbarItem } from "../../../../node_modules/vant/es/tabbar-item/index.mjs";
const _sfc_main = {
  __name: "Tabbar",
  props: {
    modelValue: {
      type: Number,
      default: 0
    },
    tabbarOptions: {
      type: Array,
      default: []
    }
  },
  emits: ["update:modelValue"],
  setup(__props, { emit: __emit }) {
    const props = __props;
    const emit = __emit;
    const activeName = computed({
      get: () => {
        return props.modelValue;
      },
      set: (val) => {
        emit("update:modelValue", val);
      }
    });
    return (_ctx, _cache) => {
      const _component_van_tabbar_item = TabbarItem;
      const _component_van_tabbar = Tabbar;
      return openBlock(), createBlock(_component_van_tabbar, mergeProps(_ctx.$attrs, {
        modelValue: unref(activeName),
        "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(activeName) ? activeName.value = $event : null),
        fixed: false,
        "safe-area-inset-bottom": ""
      }), {
        default: withCtx(() => [
          (openBlock(true), createElementBlock(Fragment, null, renderList(__props.tabbarOptions, (item) => {
            return openBlock(), createBlock(_component_van_tabbar_item, {
              icon: item.icon,
              name: item.pageId
            }, {
              default: withCtx(() => [
                createTextVNode(toDisplayString(item.title), 1)
              ]),
              _: 2
            }, 1032, ["icon", "name"]);
          }), 256)),
          renderSlot(_ctx.$slots, "default", {}, void 0, true)
        ]),
        _: 3
      }, 16, ["modelValue"]);
    };
  }
};
const _Tabbar = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-04abcf62"]]);
export {
  _Tabbar as default
};
