"use client";
import { checkStrong as b } from "../util/check-strong.js";
import { encodeCharacterReference as m } from "../util/encode-character-reference.js";
import { encodeInfo as u } from "../util/encode-info.js";
p.peek = k;
function p(c, g, o, n) {
  const r = b(o), h = 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 = u(
    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 = u(n.after.charCodeAt(0), f, r);
  d.inside && (e = e.slice(0, -1) + m(f));
  const l = t.move(r + r);
  return h(), o.attentionEncodeSurroundingInfo = {
    after: d.outside,
    before: a.outside
  }, i + e + l;
}
function k(c, g, o) {
  return o.options.strong || "*";
}
export {
  p as strong
};
