"use strict";
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const useGlobalConfig = require("./hooks/use-global-config.js");
const configProviderProps = require("./config-provider-props.js");
const Vue = require("vue");
const messageConfig = { placement: "top" };
const ConfigProvider = Vue.defineComponent({
  name: "ElConfigProvider",
  props: configProviderProps.configProviderProps,
  setup(props, { slots }) {
    const config = useGlobalConfig.provideGlobalConfig(props);
    Vue.watch(() => props.message, (val) => {
      var _a;
      Object.assign(messageConfig, ((_a = config == null ? void 0 : config.value) == null ? void 0 : _a.message) ?? {}, val ?? {});
    }, {
      immediate: true,
      deep: true
    });
    return () => Vue.renderSlot(slots, "default", { config: config == null ? void 0 : config.value });
  }
});
exports.default = ConfigProvider;
exports.messageConfig = messageConfig;
