import { ok } from "../../devlop/lib/default.js";
import { footer } from "./footer.js";
import { createState } from "./state.js";
function toHast(e, r) {
	let i = createState(e, r), a = i.one(e, void 0), o = footer(i), s = Array.isArray(a) ? {
		type: "root",
		children: a
	} : a || {
		type: "root",
		children: []
	};
	return o && ("children" in s, s.children.push({
		type: "text",
		value: "\n"
	}, o)), s;
}
export { toHast };
