import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, toHandlers, unref, withCtx, renderSlot, createCommentVNode } from 'vue';
import '../../../../utils/index.mjs';
import { carouselEmits } from 'element-plus';
import { carouselEmits as carouselEmits$1, carouselProps } from './carousel.mjs';
import { getGmEvent } from '../../../../utils/src/elementPlus/event.mjs';
import { getGmExports } from '../../../../utils/src/elementPlus/exports.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmCarousel"
  },
  __name: "Carousel",
  props: carouselProps,
  emits: carouselEmits$1,
  setup(__props, { expose: __expose, emit: __emit }) {
    const slots = useSlots();
    const props = __props;
    const emit = __emit;
    const elEvents = getGmEvent(carouselEmits, emit);
    const elRef = ref();
    const exposeEvents = ["activeIndex", "setActiveItem", "prev", "next"];
    const { exposeFns } = getGmExports(elRef, exposeEvents);
    __expose({
      elRef,
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_carousel = resolveComponent("el-carousel");
      return openBlock(), createBlock(
        _component_el_carousel,
        mergeProps({
          ref_key: "elRef",
          ref: elRef
        }, props, toHandlers(unref(elEvents))),
        {
          default: withCtx(() => [
            unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)
          ]),
          _: 3
          /* FORWARDED */
        },
        16
        /* FULL_PROPS */
      );
    };
  }
});

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