/**
 * ldesign v0.4.6
 * (c) 2023 ldesign
 * @license MIT
 */

import Vue from 'vue';
import cloneDeep from 'lodash/cloneDeep';
import { defaultGlobalConfig, mergeWith } from './context.js';
import 'lodash/merge';
import 'lodash/mergeWith';
import '../_common/js/global-config/default-config.js';
import '../_common/js/global-config/locale/zh_CN.js';
import '@babel/runtime/helpers/typeof';
import '../_chunks/dep-be599ec8.js';
import 'dayjs';
import '../_chunks/dep-67ff4010.js';
import './type.js';

var globalConfigSymbol = "__TDESIGN__INSTANCE__GLOBAL__CONFIG__";
var ConfigProvider = Vue.extend({
  name: "TConfigProvider",
  provide: function provide() {
    return {
      globalConfig: this.mergedGlobalConfig
    };
  },
  props: {
    globalConfig: Object
  },
  data: function data() {
    return {
      defaultData: cloneDeep(defaultGlobalConfig)
    };
  },
  computed: {
    mergedGlobalConfig: function mergedGlobalConfig() {
      var mergedGlobalConfig = mergeWith(this.defaultData, this.globalConfig);
      Vue.prototype[globalConfigSymbol] = mergedGlobalConfig;
      return mergedGlobalConfig;
    }
  },
  render: function render() {
    var _this$$slots$default;
    var h = arguments[0];
    if (((_this$$slots$default = this.$slots["default"]) === null || _this$$slots$default === void 0 ? void 0 : _this$$slots$default.length) === 1) return this.$slots["default"][0];
    return h("div", [this.$slots["default"]]);
  }
});

export { ConfigProvider as default, globalConfigSymbol };
//# sourceMappingURL=config-provider.js.map
