import { defineComponent, reactive, provide, watch } from 'vue';
import '../../../utils/index.mjs';
import '../../../constants/index.mjs';
import { changeConfirmLocale } from '../../modal/src/locale.mjs';
import { localeProviderProps } from './props.mjs';
import { devWarning } from '../../../utils/log.mjs';
import { ANT_MARK } from '../../../constants/component.mjs';

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

export { ALocaleProvider as default };
//# sourceMappingURL=LocaleProvider.mjs.map
