import { jsx as o } from "react/jsx-runtime";
import { w as a } from "../../../web-BbvN_Lei.js";
import { SHIKI_THEMES as c } from "../../../lib/shiki-themes.js";
import { cn as t } from "../../../lib/utils.js";
function u({ children: e, className: r, ...l }) {
  return /* @__PURE__ */ o(
    "div",
    {
      className: t(
        "not-prose flex w-full flex-col overflow-clip border",
        "rounded-xl border-border bg-card text-card-foreground",
        r
      ),
      "data-slot": "code-block",
      ...l,
      children: e
    }
  );
}
function m({
  code: e,
  language: r = "tsx",
  className: l,
  ...d
}) {
  return /* @__PURE__ */ o(
    "div",
    {
      className: t(
        "w-full overflow-x-auto text-[13px] [&_.shiki]:px-4 [&_.shiki]:py-4",
        l
      ),
      "data-slot": "code-block-code",
      ...d,
      children: e ? /* @__PURE__ */ o(
        a,
        {
          addDefaultStyles: !1,
          defaultColor: !1,
          language: r,
          showLanguage: !1,
          theme: c,
          children: e
        }
      ) : /* @__PURE__ */ o("pre", { children: /* @__PURE__ */ o("code", {}) })
    }
  );
}
function p({
  children: e,
  className: r,
  ...l
}) {
  return /* @__PURE__ */ o(
    "div",
    {
      className: t("flex items-center justify-between", r),
      "data-slot": "code-block-group",
      ...l,
      children: e
    }
  );
}
export {
  u as CodeBlock,
  m as CodeBlockCode,
  p as CodeBlockGroup
};
