import { inject, computed, unref } from 'vue';
import '../../../locale/index.mjs';
import localeValues from '../../../locale/lang/en_US.mjs';

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

export { useLocaleReceiver };
//# sourceMappingURL=useLocaleReceiver.mjs.map
