"use strict";const a=require("react"),u=require("./LocalizedStringDictionary-DZNwHzto.cjs.js"),d=require("./context-CyT9C4U4.cjs.js");function l(e){if(new Set(["en","de","es","fr-FR","pt-BR"]).has(e))return e;const o={en:"en",de:"de",es:"es",fr:"fr-FR",pt:"pt-BR"},t=e.split(/[-_]/)[0].toLowerCase();return o[t]??"en"}function p(e){const{locale:r}=d.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7();return a.useMemo(()=>{const t=new u.$5b160d28a433310d$export$c17fa47878dc55b6(e),s=l(r);return{format(i,c){try{const n=t.getStringForLocale(i,s);if(n==null)return"";if(typeof n=="function")return n(c??{});if(typeof n=="string")return n}catch{}return""}}},[e,r])}function m(e){const r={};for(const[o,t]of Object.entries(e))typeof t=="function"?r[o]=((s,i)=>{if(!s)return t({});const c={};for(const[n,f]of Object.entries(s))(typeof f=="string"||typeof f=="number")&&(c[n]=f);return t(c)}):r[o]=t;return r}exports.normalizeMessages=m;exports.useLocalizedStringFormatter=p;
//# sourceMappingURL=normalize-messages-CaDzkuUm.cjs.js.map
