/**
 * tdesign v0.46.4
 * (c) 2022 tdesign
 * @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 './type.js';

var ConfigProvider = Vue.extend({
  name: "TConfigProvider",
  props: {
    globalConfig: Object
  },
  data: function data() {
    return {
      defaultData: cloneDeep(defaultGlobalConfig)
    };
  },
  provide: function provide() {
    return {
      globalConfig: this.mergedGlobalConfig
    };
  },
  computed: {
    mergedGlobalConfig: function mergedGlobalConfig() {
      var mergedGlobalConfig = mergeWith(this.defaultData, this.globalConfig);
      return mergedGlobalConfig;
    }
  },
  render: function render() {
    var h = arguments[0];

    if (this.$slots["default"].length === 1) {
      return this.$slots["default"][0];
    }

    return h("div", [this.$slots["default"]]);
  }
});

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