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