{"version":3,"file":"loadResources.cjs","sources":["../../src/loadResources.ts"],"sourcesContent":["import { LANGUAGES, type ResourceLoader, type Resources } from '@grafana/i18n';\n\nconst resources = LANGUAGES.reduce<Record<string, () => Promise<{ default: Resources }>>>((acc, lang) => {\n  acc[lang.code] = async () => await import(`./locales/${lang.code}/grafana-prometheus.json`);\n  return acc;\n}, {});\n\nexport const loadResources: ResourceLoader = async (resolvedLanguage: string) => {\n  const translation = await resources[resolvedLanguage]();\n  return translation.default;\n};\n"],"names":["LANGUAGES"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,SAAA,GAAYA,cAAA,CAAU,MAAA,CAA8D,CAAC,KAAK,IAAA,KAAS;AACvG,EAAA,GAAA,CAAI,IAAA,CAAK,IAAI,CAAA,GAAI,YAAY,MAAM,iCAAA,CAAO,CAAA,UAAA,EAAa,KAAK,IAAI,CAAA,wBAAA,CAAA,CAAA;AAChE,EAAA,OAAO,GAAA;AACT,CAAA,EAAG,EAAE,CAAA;AAEE,MAAM,aAAA,GAAgC,OAAO,gBAAA,KAA6B;AAC/E,EAAA,MAAM,WAAA,GAAc,MAAM,SAAA,CAAU,gBAAgB,CAAA,EAAE;AACtD,EAAA,OAAO,WAAA,CAAY,OAAA;AACrB;;;;"}