import { cn as e } from "../../lib/utils.js";
/* empty css                                      */
import t from "../../node_modules/rehype-katex/lib/index.js";
import n from "../../node_modules/remark-gfm/lib/index.js";
import r from "../../node_modules/remark-math/lib/index.js";
import i from "./MermaidDiagram.js";
/* empty css         */
import "react";
import { jsx as a } from "react/jsx-runtime";
import o from "react-markdown";
//#region src/components/dynamic-form/MarkdownContent.tsx
var s = ({ content: s, className: c }) => /* @__PURE__ */ a("div", {
	className: e("markdown-content", c),
	children: /* @__PURE__ */ a(o, {
		remarkPlugins: [n, r],
		rehypePlugins: [t],
		components: {
			code: ({ children: e, className: t }) => {
				let n = !t;
				return (t?.replace("language-", "") || "") === "mermaid" && typeof e == "string" ? /* @__PURE__ */ a(i, { chart: e }) : n ? /* @__PURE__ */ a("code", { children: e }) : /* @__PURE__ */ a("code", {
					className: t,
					children: e
				});
			},
			table: ({ children: e }) => /* @__PURE__ */ a("div", {
				className: "table-wrapper",
				children: /* @__PURE__ */ a("table", { children: e })
			}),
			div: ({ className: t, children: n, ...r }) => t === "math math-display" ? /* @__PURE__ */ a("div", {
				className: "math-display-wrapper",
				children: /* @__PURE__ */ a("div", {
					className: e("math math-display", t),
					...r,
					children: n
				})
			}) : /* @__PURE__ */ a("div", {
				className: t,
				...r,
				children: n
			}),
			span: ({ className: t, children: n, ...r }) => t === "math math-inline" ? /* @__PURE__ */ a("span", {
				className: e("math math-inline", t),
				...r,
				children: n
			}) : /* @__PURE__ */ a("span", {
				className: t,
				...r,
				children: n
			})
		},
		children: s
	})
});
//#endregion
export { s as default };
