import { jsxs as a, jsx as e } from "react/jsx-runtime";
import { w as l } from "../../../web-BbvN_Lei.js";
import { CopyButton as s } from "../atoms/copy-button.js";
import { SHIKI_THEMES as n } from "../../../lib/shiki-themes.js";
import { cn as i } from "../../../lib/utils.js";
function c({ command: t, className: r, onCopy: o }) {
  return /* @__PURE__ */ a(
    "div",
    {
      className: i("relative overflow-hidden rounded-md border", r),
      children: [
        /* @__PURE__ */ e(
          "div",
          {
            className: "overflow-x-auto text-sm [&_.shiki]:py-3 [&_.shiki]:pr-14 [&_.shiki]:pl-10",
            onCopy: () => o?.("clipboard"),
            children: /* @__PURE__ */ e(
              l,
              {
                addDefaultStyles: !1,
                defaultColor: !1,
                language: "shellscript",
                showLanguage: !1,
                theme: n,
                children: t
              }
            )
          }
        ),
        /* @__PURE__ */ e(
          "span",
          {
            "aria-hidden": "true",
            className: "pointer-events-none absolute top-1/2 left-4 -translate-y-1/2 select-none text-muted-foreground",
            children: "$"
          }
        ),
        /* @__PURE__ */ e("div", { className: "absolute top-1/2 right-3 -translate-y-1/2", children: /* @__PURE__ */ e(s, { content: t, onCopy: () => o?.("copy_button") }) })
      ]
    }
  );
}
export {
  c as CommandBar
};
