var h = Object.defineProperty, k = Object.defineProperties;
var f = Object.getOwnPropertyDescriptors;
var r = Object.getOwnPropertySymbols;
var w = Object.prototype.hasOwnProperty, p = Object.prototype.propertyIsEnumerable;
var g = (e, o, t) => o in e ? h(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t, d = (e, o) => {
  for (var t in o || (o = {}))
    w.call(o, t) && g(e, t, o[t]);
  if (r)
    for (var t of r(o))
      p.call(o, t) && g(e, t, o[t]);
  return e;
}, i = (e, o) => k(e, f(o));
var u = (e, o) => {
  var t = {};
  for (var a in e)
    w.call(e, a) && o.indexOf(a) < 0 && (t[a] = e[a]);
  if (e != null && r)
    for (var a of r(e))
      o.indexOf(a) < 0 && p.call(e, a) && (t[a] = e[a]);
  return t;
};
import { jsxs as x, jsx as n } from "react/jsx-runtime";
import { Copy as N } from "../../Copy/index.mjs";
import { Space as S } from "antd";
import v from "../../../node_modules/react-syntax-highlighter/dist/esm/prism.mjs";
const C = (L) => {
  var s = L, {
    node: e,
    inline: o,
    className: t,
    children: a
  } = s, m = u(s, [
    "node",
    "inline",
    "className",
    "children"
  ]);
  const l = /language-(\w+)/.exec(t || ""), c = l ? l[1] : null;
  return !o && c ? /* @__PURE__ */ x("div", {
    className: "markdown-code",
    children: [/* @__PURE__ */ x("div", {
      className: "markdown-code-title",
      children: [/* @__PURE__ */ n("span", {
        className: "markdown-code-title-text",
        children: c
      }), /* @__PURE__ */ n(S, {
        className: "markdown-code-title-action",
        children: /* @__PURE__ */ n(N, {
          text: String(a)
        })
      })]
    }), /* @__PURE__ */ n(v, i(d({
      className: "markdown-code-context",
      language: c
    }, m), {
      wrapLongLines: !0,
      showLineNumbers: !0,
      PreTag: "div",
      children: String(a).replace(/\n$/, "")
    }))]
  }) : /* @__PURE__ */ n("code", i(d({
    className: t
  }, m), {
    children: a
  }));
}, H = C;
export {
  H as default
};
