import { r, aE as x, aF as d, j as f, aG as p } from "./mermaid-VLURNSYL-TtKCXHSS.js";
var N = ({ code: i, language: e, raw: a, className: u, startLine: n, lineNumbers: g, ...m }) => {
  let { shikiTheme: l } = r.useContext(x), s = d(), [h, t] = r.useState(a);
  return r.useEffect(() => {
    if (!s) {
      t(a);
      return;
    }
    let o = s.highlight({ code: i, language: e, themes: l }, (c) => {
      t(c);
    });
    o && t(o);
  }, [i, e, l, s, a]), f.jsx(p, { className: u, language: e, lineNumbers: g, result: h, startLine: n, ...m });
};
export {
  N as HighlightedCodeBlockBody
};
