import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot, createElementBlock, createElementVNode, normalizeProps, guardReactiveProps } from 'vue';
import '../../../../utils/index.mjs';
import { elSelectEmits, selectEmits, selectProps } from './select.mjs';
import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';
import { getGmExports } from '../../../../utils/src/elementPlus/exports.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmSelect"
  },
  __name: "Select",
  props: selectProps,
  emits: selectEmits,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = getGmEvent(elSelectEmits, emit);
    const elRef = ref();
    const exposeNames = ["focus", "blur"];
    const { exposeFns } = getGmExports(elRef, exposeNames);
    __expose({
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_select = resolveComponent("el-select");
      return openBlock(), createBlock(
        _component_el_select,
        mergeProps({
          ref_key: "elRef",
          ref: elRef
        }, props, toHandlers(unref(elEvents))),
        createSlots({
          _: 2
          /* DYNAMIC */
        }, [
          unref(slots).default ? {
            name: "default",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "default", {}, void 0, true)
            ]),
            key: "0"
          } : void 0,
          unref(slots).header ? {
            name: "header",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "header", {}, void 0, true)
            ]),
            key: "1"
          } : void 0,
          unref(slots).footer ? {
            name: "footer",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "footer", {}, void 0, true)
            ]),
            key: "2"
          } : void 0,
          unref(slots).prefix ? {
            name: "prefix",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
            ]),
            key: "3"
          } : void 0,
          unref(slots).empty ? {
            name: "empty",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "empty", {}, void 0, true)
            ]),
            key: "4"
          } : void 0,
          unref(slots).tag ? {
            name: "tag",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "tag", {}, void 0, true)
            ]),
            key: "5"
          } : void 0,
          unref(slots).loading ? {
            name: "loading",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "loading", {}, void 0, true)
            ]),
            key: "6"
          } : {
            name: "loading",
            fn: withCtx(() => [
              (openBlock(), createElementBlock("svg", {
                class: "circular gm-inline gm-h-[30px] gm-w-[30px]",
                viewBox: "0 0 50 50"
              }, [
                createElementVNode("circle", {
                  class: "path gm-stroke-2",
                  cx: "25",
                  cy: "25",
                  r: "20",
                  fill: "none"
                })
              ]))
            ]),
            key: "7"
          },
          unref(slots).label ? {
            name: "label",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(slotValue)), void 0, true)
            ]),
            key: "8"
          } : void 0
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=Select.vue2.mjs.map
