{"version":3,"file":"getDictionary.cjs","names":["getBasePlugins","getContent"],"sources":["../../../src/interpreter/getDictionary.ts"],"sourcesContent":["import type { Dictionary } from '@intlayer/types/dictionary';\nimport type {\n  DeclaredLocales,\n  LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport type {\n  DeepTransformContent,\n  IInterpreterPluginState,\n  NodeProps,\n  Plugins,\n} from './getContent';\nimport { getBasePlugins, 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  const T extends Dictionary,\n  const L extends LocalesValues = DeclaredLocales,\n>(\n  dictionary: T,\n  locale?: L,\n  plugins: Plugins[] = getBasePlugins(locale)\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, plugins);\n};\n"],"mappings":";;;;;;;;;;;;AAqBA,MAAa,iBAIX,YACA,QACA,UAAqBA,yDAAe,OAAO,KACwB;CACnE,MAAM,QAAmB;EACvB,eAAe,WAAW;EAC1B,gBAAgB,WAAW;EAC3B,SAAS,EAAE;EACX;EACD;AAED,QAAOC,qDAAW,WAAW,SAAS,OAAO,QAAQ"}