"use client";
import { i as e, n as t, r as n } from "./markdown-D3ExE6yF.js";
import { useContext as r, useEffect as i, useState as a } from "react";
import { jsx as o } from "react/jsx-runtime";
//#region ../../node_modules/.bun/streamdown@2.5.0+ce1ef6d2b8c9a15c/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(e), h = n(), [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(t, {
		className: u,
		language: c,
		lineNumbers: f,
		result: g,
		startLine: d,
		...p
	});
};
//#endregion
export { s as HighlightedCodeBlockBody };
