import { markdownLineEnding as e, markdownLineEndingOrSpace as t, markdownSpace as n } from "../../micromark-util-character/index.js";
import { factorySpace as r } from "../../micromark-factory-space/index.js";
//#region ../../node_modules/micromark-extension-gfm-task-list-item/lib/syntax.js
var i = {
	name: "tasklistCheck",
	tokenize: o
};
function a() {
	return { text: { 91: i } };
}
function o(r, i, a) {
	let o = this;
	return c;
	function c(e) {
		return o.previous !== null || !o._gfmTasklistFirstContentOfListItem ? a(e) : (r.enter("taskListCheck"), r.enter("taskListCheckMarker"), r.consume(e), r.exit("taskListCheckMarker"), l);
	}
	function l(e) {
		return t(e) ? (r.enter("taskListCheckValueUnchecked"), r.consume(e), r.exit("taskListCheckValueUnchecked"), u) : e === 88 || e === 120 ? (r.enter("taskListCheckValueChecked"), r.consume(e), r.exit("taskListCheckValueChecked"), u) : a(e);
	}
	function u(e) {
		return e === 93 ? (r.enter("taskListCheckMarker"), r.consume(e), r.exit("taskListCheckMarker"), r.exit("taskListCheck"), d) : a(e);
	}
	function d(t) {
		return e(t) ? i(t) : n(t) ? r.check({ tokenize: s }, i, a)(t) : a(t);
	}
}
function s(e, t, n) {
	return r(e, i, "whitespace");
	function i(e) {
		return e === null ? n(e) : t(e);
	}
}
//#endregion
export { a as gfmTaskListItem };
