import { encodeCharacterReference as e } from "../util/encode-character-reference.js";
import { encodeInfo as t } from "../util/encode-info.js";
import { checkStrong as n } from "../util/check-strong.js";
//#region ../../node_modules/mdast-util-to-markdown/lib/handle/strong.js
r.peek = i;
function r(r, i, a, o) {
	let s = n(a), c = a.enter("strong"), l = a.createTracker(o), u = l.move(s + s), d = l.move(a.containerPhrasing(r, {
		after: s,
		before: u,
		...l.current()
	})), f = d.charCodeAt(0), p = t(o.before.charCodeAt(o.before.length - 1), f, s);
	p.inside && (d = e(f) + d.slice(1));
	let m = d.charCodeAt(d.length - 1), h = t(o.after.charCodeAt(0), m, s);
	h.inside && (d = d.slice(0, -1) + e(m));
	let g = l.move(s + s);
	return c(), a.attentionEncodeSurroundingInfo = {
		after: h.outside,
		before: p.outside
	}, u + d + g;
}
function i(e, t, n) {
	return n.options.strong || "*";
}
//#endregion
export { r as strong };
