"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("lodash-unified"),t=require("vue");require("../../locale/index.js");const i=require("../../locale/lang/zh-cn.js"),l=e=>(n,o)=>c(n,o,t.unref(e)),c=(e,n,o)=>s.get(o,e,e).replace(/\{(\w+)\}/g,(f,r)=>`${n?.[r]??`{${r}}`}`),u=e=>{const n=t.computed(()=>t.unref(e).name),o=t.isRef(e)?e:t.ref(e);return{lang:n,locale:o,t:l(e)}},a=Symbol("localeContextKey"),d=e=>{const n=e||t.inject(a,t.ref());return u(t.computed(()=>n?.value||i.default))};exports.buildLocaleContext=u;exports.buildTranslator=l;exports.localeContextKey=a;exports.translate=c;exports.useLocale=d;
