import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createVNode } from 'vue';
import '../../../../utils/index.mjs';
import { tooltipEmits } from 'element-plus';
import VNodeRenderer from '../../common/VNodeRenderer.mjs';
import { tooltipEmits as tooltipEmits$1, tooltipProps } from './tooltip.mjs';
import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';
import { getGmExports } from '../../../../utils/src/elementPlus/exports.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmTooltip"
  },
  __name: "Tooltip",
  props: tooltipProps,
  emits: tooltipEmits$1,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = getGmEvent(tooltipEmits, emit);
    const elRef = ref();
    const exposeEvents = ["popperRef", "contentRef", "isFocusInsideContent", "updatePopper", "onOpen", "onClose", "hide"];
    const { exposeFns } = getGmExports(elRef, exposeEvents);
    __expose({
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_tooltip = resolveComponent("el-tooltip");
      return openBlock(), createBlock(
        _component_el_tooltip,
        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).content ? {
            name: "content",
            fn: withCtx(() => [
              createVNode(unref(VNodeRenderer), {
                vnode: unref(slots).content()
              }, null, 8, ["vnode"])
            ]),
            key: "1"
          } : void 0
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

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