import { defineComponent, useSlots, ref, resolveComponent, createBlock, openBlock, mergeProps, createSlots, withCtx, unref, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
import { provideGlobalConfig } from 'element-plus';
import { provideGlobalConfig as provideGlobalConfig$1 } from '../../../../hooks/base/useGlobalConfig/index.mjs';
import { configProviderProps } from './configProvider.mjs';

var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "GmConfigProvider"
  },
  __name: "ConfigProvider",
  props: configProviderProps,
  setup(__props, { expose: __expose }) {
    const slots = useSlots();
    const props = __props;
    provideGlobalConfig(props);
    provideGlobalConfig$1({
      message: props.message
    });
    const elRef = ref();
    __expose({
      elRef
    });
    return (_ctx, _cache) => {
      const _component_el_config_provider = resolveComponent("el-config-provider");
      return openBlock(), createBlock(
        _component_el_config_provider,
        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
        ]),
        1040
        /* FULL_PROPS, DYNAMIC_SLOTS */
      );
    };
  }
});

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