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