"use client";
import { At as e, Li as t, R as n } from "./chunk-BO2N2NFS.js";
import { useContext as r, useEffect as i, useState as a } from "react";
import { jsx as o } from "react/jsx-runtime";
//#region ../../node_modules/streamdown/dist/highlighted-body-OFNGDK62.js
var s = ({ code: s, language: c, raw: l, className: u, startLine: d, lineNumbers: f, ...p }) => {
	let { shikiTheme: m } = r(n), h = t(), [g, _] = a(l);
	return i(() => {
		if (!h) {
			_(l);
			return;
		}
		let e = h.highlight({
			code: s,
			language: c,
			themes: m
		}, (e) => {
			_(e);
		});
		e && _(e);
	}, [
		s,
		c,
		m,
		h,
		l
	]), o(e, {
		className: u,
		language: c,
		lineNumbers: f,
		result: g,
		startLine: d,
		...p
	});
};
//#endregion
export { s as HighlightedCodeBlockBody };
