'use strict';

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

var vue = require('vue');
require('../../../utils/index.cjs');
require('../../../constants/index.cjs');
var locale = require('../../modal/src/locale.cjs');
var props = require('./props.cjs');
var log = require('../../../utils/log.cjs');
var component = require('../../../constants/component.cjs');

var ALocaleProvider = /* @__PURE__ */ vue.defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: "ALocaleProvider",
  props: props.localeProviderProps(),
  setup(props, {
    slots
  }) {
    log.devWarning(props.ANT_MARK__ === component.ANT_MARK, "LocaleProvider", "`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead");
    const state = vue.reactive({
      antLocale: {
        ...props.locale,
        exist: true
      },
      ANT_MARK__: component.ANT_MARK
    });
    vue.provide("localeData", state);
    vue.watch(() => props.locale, (locale$1) => {
      locale.changeConfirmLocale(locale$1 && locale$1.Modal);
      state.antLocale = {
        ...locale$1,
        exist: true
      };
    }, {
      immediate: true
    });
    return () => {
      var _a;
      return (_a = slots.default) == null ? void 0 : _a.call(slots);
    };
  }
});

exports.default = ALocaleProvider;
//# sourceMappingURL=LocaleProvider.cjs.map
