import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, unref, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
import '../../../../utils/index.mjs';
import { formItemExposeNames, formItemProps } from './formItem.mjs';
import { getGmExports } from '../../../../utils/src/elementPlus/exports.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmFormItem"
  },
  __name: "FormItem",
  props: formItemProps,
  setup(__props, { expose: __expose }) {
    const slots = useSlots();
    const props = __props;
    const elRef = ref();
    const { exposeFns } = getGmExports(elRef, formItemExposeNames);
    __expose({
      ...exposeFns
    });
    return (_ctx, _cache) => {
      const _component_el_form_item = resolveComponent("el-form-item");
      return openBlock(), createBlock(
        _component_el_form_item,
        mergeProps({
          ref_key: "elRef",
          ref: elRef
        }, props),
        createSlots({
          _: 2
          /* DYNAMIC */
        }, [
          unref(slots).default ? {
            name: "default",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "0"
          } : void 0,
          unref(slots).label ? {
            name: "label",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "1"
          } : void 0,
          unref(slots).error ? {
            name: "error",
            fn: withCtx((slotValue) => [
              renderSlot(_ctx.$slots, "error", normalizeProps(guardReactiveProps(slotValue)))
            ]),
            key: "2"
          } : void 0
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

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