import { factorySpace } from "../../../micromark-factory-space/index.js";
import { blankLine } from "../../../micromark-core-commonmark/lib/blank-line.js";
import { content } from "../../../micromark-core-commonmark/lib/content.js";
const flow = { tokenize: initializeFlow };
function initializeFlow(r) {
	let i = this, a = r.attempt(blankLine, o, r.attempt(this.parser.constructs.flowInitial, s, factorySpace(r, r.attempt(this.parser.constructs.flow, s, r.attempt(content, s)), "linePrefix")));
	return a;
	function o(e) {
		if (e === null) {
			r.consume(e);
			return;
		}
		return r.enter("lineEndingBlank"), r.consume(e), r.exit("lineEndingBlank"), i.currentConstruct = void 0, a;
	}
	function s(e) {
		if (e === null) {
			r.consume(e);
			return;
		}
		return r.enter("lineEnding"), r.consume(e), r.exit("lineEnding"), i.currentConstruct = void 0, a;
	}
}
export { flow };
