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