'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
var locale$1 = require('../modal/locale.js');
var warning = require('../_util/warning.js');
var type = require('../_util/type.js');

const ANT_MARK = "internalMark";
const LocaleProvider = vue.defineComponent({
  compatConfig: { MODE: 3 },
  name: "ALocaleProvider",
  props: {
    locale: {
      type: Object
    },
    ANT_MARK__: String
  },
  setup(props, { slots }) {
    warning.default(
      props.ANT_MARK__ === ANT_MARK,
      "LocaleProvider",
      "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead"
    );
    const state = vue.reactive({
      antLocale: {
        ...props.locale,
        exist: true
      },
      ANT_MARK__: ANT_MARK
    });
    vue.provide("localeData", state);
    vue.watch(
      () => props.locale,
      (locale2) => {
        locale$1.changeConfirmLocale(locale2 && locale2.Modal);
        state.antLocale = {
          ...locale2,
          exist: true
        };
      },
      { immediate: true }
    );
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});
LocaleProvider.install = function(app) {
  app.component(LocaleProvider.name, LocaleProvider);
  return app;
};
const locale = type.withInstall(LocaleProvider);

exports.ANT_MARK = ANT_MARK;
exports.default = locale;
//# sourceMappingURL=index.js.map
