'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var exports$1 = require('../../../../utils/src/elementPlus/exports.js');
var popover = require('./popover.js');

var _sfc_main = /* @__PURE__ */ vue.defineComponent({
  ...{
    name: "GmPopover"
  },
  __name: "Popover",
  props: popover.popoverProps,
  emits: popover.popoverEmits,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = vue.useSlots();
    const props = __props;
    const emit = __emit;
    const onUpdateVisible = vue.computed(() => {
      return props["onUpdate:visible"];
    });
    const beforeEnter = () => {
      emit("before-enter");
    };
    const beforeLeave = () => {
      emit("before-leave");
    };
    const afterEnter = () => {
      emit("after-enter");
    };
    const afterLeave = () => {
      emit("after-leave");
    };
    const elRef = vue.ref();
    const exposeNames = ["hide"];
    const { exposeFns } = exports$1.getGmExports(elRef, exposeNames);
    __expose({
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_popover = vue.resolveComponent("el-popover");
      return vue.openBlock(), vue.createBlock(_component_el_popover, vue.mergeProps(props, {
        "onUpdate:visible": onUpdateVisible.value,
        onBeforeShow: beforeEnter,
        onBeforeHide: beforeLeave,
        onShow: afterEnter,
        onHide: afterLeave
      }), vue.createSlots({
        _: 2
        /* DYNAMIC */
      }, [
        vue.unref(slots).reference ? {
          name: "reference",
          fn: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "reference")
          ]),
          key: "0"
        } : void 0,
        vue.unref(slots).default ? {
          name: "default",
          fn: vue.withCtx(() => [
            vue.renderSlot(_ctx.$slots, "default")
          ]),
          key: "1"
        } : void 0
      ]), 1040, ["onUpdate:visible"]);
    };
  }
});

exports.default = _sfc_main;
//# sourceMappingURL=Popover.vue2.js.map
