"use client";
import { visit as o } from "../../../unist-util-visit/lib/index.js";
import { toString as a } from "../../../mdast-util-to-string/lib/index.js";
import { EXIT as f } from "../../../unist-util-visit-parents/lib/index.js";
function u(t, i) {
  let e = !1;
  return o(t, function(r) {
    if ("value" in r && /\r?\n|\r/.test(r.value) || r.type === "break")
      return e = !0, f;
  }), !!((!t.depth || t.depth < 3) && a(t) && (i.options.setext || e));
}
export {
  u as formatHeadingAsSetext
};
