{"version":3,"file":"getDictionary.cjs","names":["props: NodeProps","getContent"],"sources":["../../../src/interpreter/getDictionary.ts"],"sourcesContent":["import type {\n  DeclaredLocales,\n  Dictionary,\n  LocalesValues,\n} from '@intlayer/types';\nimport type {\n  DeepTransformContent,\n  IInterpreterPluginState,\n  NodeProps,\n  Plugins,\n} from './getContent';\nimport { getContent } from './getContent/getContent';\n\n/**\n * Transforms a dictionary in a single pass, applying each plugin as needed.\n *\n * @param dictionary The dictionary to transform.\n * @param locale The locale to use if your transformers need it (e.g. for translations).\n * @param additionalPlugins An array of NodeTransformer that define how to transform recognized nodes.\n *                      If omitted, we’ll use a default set of plugins.\n */\nexport const getDictionary = <\n  T extends Dictionary,\n  L extends LocalesValues = DeclaredLocales,\n>(\n  dictionary: T,\n  locale?: L,\n  plugins?: Plugins[]\n): DeepTransformContent<T['content'], IInterpreterPluginState, L> => {\n  const props: NodeProps = {\n    dictionaryKey: dictionary.key,\n    dictionaryPath: dictionary.filePath,\n    keyPath: [],\n    plugins,\n  };\n\n  return getContent(dictionary.content, props, locale);\n};\n"],"mappings":";;;;;;;;;;;AAqBA,MAAa,iBAIX,YACA,QACA,YACmE;CACnE,MAAMA,QAAmB;EACvB,eAAe,WAAW;EAC1B,gBAAgB,WAAW;EAC3B,SAAS,EAAE;EACX;EACD;AAED,QAAOC,qDAAW,WAAW,SAAS,OAAO,OAAO"}