import { whitespace as e } from "../../../hast-util-whitespace/lib/index.js";
import { siblingAfter as t } from "./util/siblings.js";
import { omission as n } from "./omission.js";
//#region ../../node_modules/hast-util-to-html/lib/omission/closing.js
var r = n({
	body: o,
	caption: i,
	colgroup: i,
	dd: u,
	dt: l,
	head: i,
	html: a,
	li: c,
	optgroup: f,
	option: p,
	p: s,
	rp: d,
	rt: d,
	tbody: h,
	td: v,
	tfoot: g,
	th: v,
	thead: m,
	tr: _
});
function i(n, r, i) {
	let a = t(i, r, !0);
	return !a || a.type !== "comment" && !(a.type === "text" && e(a.value.charAt(0)));
}
function a(e, n, r) {
	let i = t(r, n);
	return !i || i.type !== "comment";
}
function o(e, n, r) {
	let i = t(r, n);
	return !i || i.type !== "comment";
}
function s(e, n, r) {
	let i = t(r, n);
	return i ? i.type === "element" && (i.tagName === "address" || i.tagName === "article" || i.tagName === "aside" || i.tagName === "blockquote" || i.tagName === "details" || i.tagName === "div" || i.tagName === "dl" || i.tagName === "fieldset" || i.tagName === "figcaption" || i.tagName === "figure" || i.tagName === "footer" || i.tagName === "form" || i.tagName === "h1" || i.tagName === "h2" || i.tagName === "h3" || i.tagName === "h4" || i.tagName === "h5" || i.tagName === "h6" || i.tagName === "header" || i.tagName === "hgroup" || i.tagName === "hr" || i.tagName === "main" || i.tagName === "menu" || i.tagName === "nav" || i.tagName === "ol" || i.tagName === "p" || i.tagName === "pre" || i.tagName === "section" || i.tagName === "table" || i.tagName === "ul") : !r || !(r.type === "element" && (r.tagName === "a" || r.tagName === "audio" || r.tagName === "del" || r.tagName === "ins" || r.tagName === "map" || r.tagName === "noscript" || r.tagName === "video"));
}
function c(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && i.tagName === "li";
}
function l(e, n, r) {
	let i = t(r, n);
	return !!(i && i.type === "element" && (i.tagName === "dt" || i.tagName === "dd"));
}
function u(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && (i.tagName === "dt" || i.tagName === "dd");
}
function d(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && (i.tagName === "rp" || i.tagName === "rt");
}
function f(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && i.tagName === "optgroup";
}
function p(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && (i.tagName === "option" || i.tagName === "optgroup");
}
function m(e, n, r) {
	let i = t(r, n);
	return !!(i && i.type === "element" && (i.tagName === "tbody" || i.tagName === "tfoot"));
}
function h(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && (i.tagName === "tbody" || i.tagName === "tfoot");
}
function g(e, n, r) {
	return !t(r, n);
}
function _(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && i.tagName === "tr";
}
function v(e, n, r) {
	let i = t(r, n);
	return !i || i.type === "element" && (i.tagName === "td" || i.tagName === "th");
}
//#endregion
export { r as closing };
