import { cn as e } from "../../../lib/utils.js";
import { t } from "../../../web-DF40pCMx.js";
import { SHIKI_THEMES as n } from "../../../lib/shiki-themes.js";
import { CopyButton as r } from "../atoms/copy-button.js";
import { jsx as i, jsxs as a } from "react/jsx-runtime";
//#region lib/components/ui/molecules/command-bar.tsx
function o({ command: o, className: s, onCopy: c }) {
	return /* @__PURE__ */ a("div", {
		className: e("relative overflow-hidden rounded-md border", s),
		children: [
			/* @__PURE__ */ i("div", {
				className: "overflow-x-auto text-sm [&_.shiki]:py-3 [&_.shiki]:pr-14 [&_.shiki]:pl-10",
				onCopy: () => c?.("clipboard"),
				children: /* @__PURE__ */ i(t, {
					addDefaultStyles: !1,
					defaultColor: !1,
					language: "shellscript",
					showLanguage: !1,
					theme: n,
					children: o
				})
			}),
			/* @__PURE__ */ i("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__ */ i("div", {
				className: "absolute top-1/2 right-3 -translate-y-1/2",
				children: /* @__PURE__ */ i(r, {
					content: o,
					onCopy: () => c?.("copy_button")
				})
			})
		]
	});
}
//#endregion
export { o as CommandBar };
