import { getNodeChildren, getNodeType } from "@intlayer/core";
import { NodeType } from "@intlayer/types";

//#region src/components/DictionaryFieldEditor/getIsEditableSection.ts
const getIsEditableSection = (section) => {
	const children = getNodeChildren(section);
	const nodeType = getNodeType(section);
	if (children && (nodeType === NodeType.ReactNode || nodeType === NodeType.File)) return true;
	if (children && typeof children.nodeType === "string") return getIsEditableSection(children[children.nodeType]);
	return typeof children === "string" || typeof children === "number" || typeof children === "boolean" || typeof children === "undefined";
};

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