const GLOBAL_KEY = "__openMercatoI18nDictionaryCache__";
function getCache() {
  const globalScope = globalThis;
  if (!globalScope[GLOBAL_KEY]) {
    globalScope[GLOBAL_KEY] = /* @__PURE__ */ new Map();
  }
  return globalScope[GLOBAL_KEY];
}
function getCachedDictionary(locale) {
  return getCache().get(locale);
}
function setCachedDictionary(locale, dict) {
  getCache().set(locale, dict);
}
function invalidateDictionaryCache() {
  getCache().clear();
}
function invalidateDictionaryCacheLocales(locales) {
  const cache = getCache();
  for (const locale of locales) cache.delete(locale);
}
export {
  getCachedDictionary,
  invalidateDictionaryCache,
  invalidateDictionaryCacheLocales,
  setCachedDictionary
};
//# sourceMappingURL=dictionary-cache.js.map
