import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
import '../../../../utils/index.mjs';
import { autocompleteEmits } from 'element-plus';
import { autocompleteEmits as autocompleteEmits$1, autocompleteProps } from './autocomplete.mjs';
import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmAutocomplete"
  },
  __name: "Autocomplete",
  props: autocompleteProps,
  emits: autocompleteEmits$1,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = getGmEvent(autocompleteEmits, emit);
    const elRef = ref();
    __expose({
      elRef
    });
    return (_ctx, _cache) => {
      const _component_el_autocomplete = resolveComponent("el-autocomplete");
      return openBlock(), createBlock(
        _component_el_autocomplete,
        mergeProps({
          ref_key: "elRef",
          ref: elRef
        }, props, toHandlers(unref(elEvents))),
        createSlots({
          _: 2
          /* DYNAMIC */
        }, [
          unref(slots).default ? {
            name: "default",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "0"
          } : void 0,
          unref(slots).prefix ? {
            name: "prefix",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "prefix", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "1"
          } : void 0,
          unref(slots).suffix ? {
            name: "suffix",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "suffix", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "2"
          } : void 0,
          unref(slots).prepend ? {
            name: "prepend",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "prepend", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "3"
          } : void 0,
          unref(slots).append ? {
            name: "append",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "append", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "4"
          } : void 0,
          unref(slots).loading ? {
            name: "loading",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "5"
          } : void 0
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

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