'use strict';

var vue = require('vue');
require('../../../locale/index.cjs');
var en_US = require('../../../locale/lang/en_US.cjs');

function useLocaleReceiver(componentName, defaultLocale, propsLocale) {
  const localeData = vue.inject("localeData", {});
  const componentLocale = vue.computed(() => {
    const { antLocale } = localeData;
    const locale = vue.unref(defaultLocale) || en_US.default[componentName || "global"];
    const localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
    return {
      ...typeof locale === "function" ? locale() : locale,
      ...localeFromContext || {},
      ...vue.unref(propsLocale) || {}
    };
  });
  return [componentLocale];
}

exports.useLocaleReceiver = useLocaleReceiver;
//# sourceMappingURL=useLocaleReceiver.cjs.map
