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

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmDialog"
  },
  __name: "Dialog",
  props: dialogProps,
  emits: dialogEmits$1,
  setup(__props, { emit: __emit }) {
    const slots = useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = getGmEvent(dialogEmits, emit);
    return (_ctx, _cache) => {
      const _component_el_dialog = resolveComponent("el-dialog");
      return openBlock(), createBlock(
        _component_el_dialog,
        mergeProps({ ref: "elRef" }, props, toHandlers(unref(elEvents))),
        createSlots({
          _: 2
          /* DYNAMIC */
        }, [
          unref(slots).header ? {
            name: "header",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "0"
          } : void 0,
          unref(slots).default ? {
            name: "default",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "default")
            ]),
            key: "1"
          } : void 0,
          unref(slots).footer ? {
            name: "footer",
            fn: withCtx(() => [
              renderSlot(_ctx.$slots, "footer")
            ]),
            key: "2"
          } : void 0
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

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