import{defineComponent as d,inject as p,computed as r,unref as f}from"vue";import u from"./en_US.mjs";const g=d({compatConfig:{MODE:3},name:"LocaleReceiver",props:{componentName:String,defaultLocale:{type:[Object,Function]},children:{type:Function}},setup(t,{slots:n}){const c=p("localeData",{}),a=r(()=>{const{componentName:e="global",defaultLocale:o}=t,l=o||u[e||"global"],{antLocale:i}=c,m=e&&i?i[e]:{};return{...typeof l=="function"?l():l,...m||{}}}),s=r(()=>{const{antLocale:e}=c,o=e&&e.locale;return e&&e.exist&&!o?u.locale:o});return()=>{const e=t.children||n.default,{antLocale:o}=c;return e?.(a.value,s.value,o)}}});function v(t,n,c){const a=p("localeData",{});return[r(()=>{const{antLocale:e}=a,o=f(n)||u[t||"global"],l=t&&e?e[t]:{};return{...typeof o=="function"?o():o,...l||{},...f(c)||{}}})]}export{g as default,v as useLocaleReceiver};
