const require_deepTransform = require('../interpreter/getContent/deepTransform.cjs');
const require_plugins = require('../interpreter/getContent/plugins.cjs');

//#region ../cli/dist/esm/core/dist/esm/deepTransformPlugins/getLocalizedContent.mjs
/**
* Transforms a node in a single pass, applying each plugin as needed.
* In comparison to `getContent`, this function will only apply the translation plugin.
* It will not transform enumerations, insertions, or other content types.
*
* @param node The node to transform.
* @param locale The locale to use if your transformers need it (e.g. for translations).
*/
const getLocalizedContent = (node, locale, nodeProps, fallback) => {
	const plugins = [require_plugins.translationPlugin(locale, fallback), ...nodeProps.plugins ?? []];
	return require_deepTransform.deepTransformNode(node, {
		...nodeProps,
		plugins
	});
};
const getPerLocaleDictionary = (dictionary, locale, fallback) => ({
	...dictionary,
	locale,
	content: getLocalizedContent(dictionary.content, locale, {
		dictionaryKey: dictionary.key,
		keyPath: [],
		plugins: []
	}, fallback)
});

//#endregion
exports.getPerLocaleDictionary = getPerLocaleDictionary;
//# sourceMappingURL=getLocalizedContent.cjs.map