import { visit as e } from "../../../unist-util-visit/lib/index.js";
import { toString as t } from "../../../mdast-util-to-string/lib/index.js";
//#region ../../node_modules/mdast-util-to-markdown/lib/util/format-heading-as-setext.js
function n(n, r) {
	let i = !1;
	return e(n, function(e) {
		if ("value" in e && /\r?\n|\r/.test(e.value) || e.type === "break") return i = !0, !1;
	}), !!((!n.depth || n.depth < 3) && t(n) && (r.options.setext || i));
}
//#endregion
export { n as formatHeadingAsSetext };
