import { built_default } from "../../config/dist/esm/built.mjs";
import { deepTransformNode } from "./deepTransform.mjs";
import { conditionPlugin, enumerationPlugin, filePlugin, insertionPlugin, nestedPlugin, translationPlugin } from "./plugins.mjs";

//#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 = built_default?.internationalization?.defaultLocale;
	const plugins = [
		insertionPlugin,
		translationPlugin(locale ?? defaultLocale, defaultLocale),
		enumerationPlugin,
		conditionPlugin,
		nestedPlugin,
		filePlugin,
		...nodeProps.plugins ?? []
	];
	return deepTransformNode(node, {
		...nodeProps,
		plugins
	});
};

//#endregion
export { getContent };
//# sourceMappingURL=getContent.mjs.map