const require_built = require('../../config/dist/esm/built.cjs');
const require_deepTransform = require('./deepTransform.cjs');
const require_plugins = require('./plugins.cjs');

//#region ../react-intlayer/dist/esm/@intlayer/core/dist/esm/interpreter/getContent/getContent.mjs
/**
* Transforms a node in a single pass, applying each plugin as needed.
*
* @param node The node to transform.
* @param locale The locale to use if your transformers need it (e.g. for translations).
*/
const getContent = (node, nodeProps, locale) => {
	const defaultLocale = require_built.built_default?.internationalization?.defaultLocale;
	const plugins = [
		require_plugins.insertionPlugin,
		require_plugins.translationPlugin(locale ?? defaultLocale, defaultLocale),
		require_plugins.enumerationPlugin,
		require_plugins.conditionPlugin,
		require_plugins.nestedPlugin,
		require_plugins.filePlugin,
		...nodeProps.plugins ?? []
	];
	return require_deepTransform.deepTransformNode(node, {
		...nodeProps,
		plugins
	});
};

//#endregion
exports.getContent = getContent;
//# sourceMappingURL=getContent.cjs.map