{"version":3,"mappings":"gGAAO,MAAMA,GAAyB,sBACzBC,GAA0B,uBAC1BC,GAAqB,kBACrBC,GAAyB,sBACzBC,GAA4B,oynBCgBnCC,GAAYC,GAAkD,CAClE,OAAQA,EAAa,CACnB,KAAKH,GACI,OAAAI,GACT,KAAKN,GACI,OAAAO,GACT,KAAKN,GACI,OAAAO,EACT,KAAKT,GACI,OAAAU,EACT,KAAKN,GACI,OAAAO,EAEP,CAEN,EAEO,SAASC,GAAaN,EAAqBO,EAA4BC,EAAgB,UAAkC,CAC1H,GAAAD,IAAaC,EAAgB,UAAW,CACpC,MAAAC,EAAQV,GAASC,CAAW,EAClC,GAAIS,EACK,eAAQ,QAAQA,CAAK,CAC9B,CAEF,OAAOC,GAAA,sDAAAC,EAAA,+BAAAC,EAAA,6DAAAD,EAAA,+BAAAE,EAAA,iEAAAF,EAAA,iHAAAA,EAAA,+BAAAG,EAAA,0LAAAH,EAAA,4GAAAA,EAAA,uGAAAA,EAAA,+BAAAI,EAAA,sEAAAJ,EAAA,+BAAAK,EAAA,wCAAAhB,EAAA,YAAAO,EAAA,WACT","names":["DirekteinnsynJSProject","RegisterinnsynJSProject","ForskningJSProject","HelseregistreJSProject","TestRegisterinnsynProject","getTekst","projectName","helseregisterTekster","registerinnsynTekster","forskningsTekster","direkteInnsynTekst","testRegisterInnsynTekster","getResources","language","LanguageLocales","tekst","__variableDynamicImportRuntimeHelper","__vitePreload","HN_Direkteinnsyn_JS_nbNO","HN_Forskning_JS_nbNO","HN_Helseregistre_JS_nbNO","HN_Registerinnsyn_JS_nbNO","HN_TestRegisterinnsyn_JS_nbNO"],"ignoreList":[],"sources":["../../../src/types/project-name-constant.tsx","../../../src/resources/index.ts"],"sourcesContent":["export const DirekteinnsynJSProject = 'HN.Direkteinnsyn.JS';\nexport const RegisterinnsynJSProject = 'HN.Registerinnsyn.JS';\nexport const ForskningJSProject = 'HN.Forskning.JS';\nexport const HelseregistreJSProject = 'HN.Helseregistre.JS';\nexport const TestRegisterinnsynProject = 'HN.TestRegisterinnsyn.JS';\nexport const CommonJSProject = 'HN.MinHelse.Common.JS';\nexport const DirekteinnsynMinHelseJSProject = 'HN.MinHelse.Direkteinnsyn.JS';\nexport const RFJSProject = 'HN.RF.JS';\n","import {\n HelseregistreJSProject,\n DirekteinnsynJSProject,\n ForskningJSProject,\n RegisterinnsynJSProject,\n TestRegisterinnsynProject,\n} from '../types/project-name-constant';\nimport { HNHelseregistreJS } from '../types/Resources';\n\nimport LanguageLocales from '@helsenorge/core-utils/constants/languages';\nimport { getModifiedResourcesForTest } from '@helsenorge/framework-utils/resources';\n\nimport direkteInnsynTekst from './HN.Direkteinnsyn.JS.nb-NO.json';\nimport forskningsTekster from './HN.Forskning.JS.nb-NO.json';\nimport helseregisterTekster from './HN.Helseregistre.JS.nb-NO.json';\nimport registerinnsynTekster from './HN.Registerinnsyn.JS.nb-NO.json';\nimport testRegisterInnsynTekster from './HN.TestRegisterinnsyn.JS.nb-NO.json';\n\ntype ResourceItem = { [key: string]: string } | Record;\n\nconst getTekst = (projectName: string): ResourceItem | undefined => {\n switch (projectName) {\n case HelseregistreJSProject:\n return helseregisterTekster;\n case RegisterinnsynJSProject:\n return registerinnsynTekster;\n case ForskningJSProject:\n return forskningsTekster;\n case DirekteinnsynJSProject:\n return direkteInnsynTekst;\n case TestRegisterinnsynProject:\n return testRegisterInnsynTekster;\n default:\n break;\n }\n};\n\nexport function getResources(projectName: string, language: LanguageLocales = LanguageLocales.NORWEGIAN): Promise {\n if (language === LanguageLocales.NORWEGIAN) {\n const tekst = getTekst(projectName);\n if (tekst) {\n return Promise.resolve(tekst);\n }\n }\n return import(`./${projectName}.${language}.json`);\n}\n\nexport function getResourcesTestHelper(projectName: string = HelseregistreJSProject): ResourceItem {\n const tekst = getTekst(projectName);\n if (tekst) {\n return getModifiedResourcesForTest(tekst);\n }\n\n return getModifiedResourcesForTest(helseregisterTekster) as HNHelseregistreJS;\n}\n"],"file":"static/js/index.VU0obDgs.js"}