'use client';

import { CopyButton } from "../CopyButton/index.mjs";
import { PopoverXAlign } from "../Popover/static.mjs";
import { Popover } from "../Popover/dynamic.mjs";
import { jsx, jsxs } from "react/jsx-runtime";
import { useIntlayer } from "react-intlayer";

//#region src/components/IDE/CopyCode.tsx
const CopyCode = ({ code }) => {
	const { title, description } = useIntlayer("code");
	return /* @__PURE__ */ jsxs(Popover, {
		identifier: "copy",
		children: [/* @__PURE__ */ jsx(CopyButton, { content: code }), /* @__PURE__ */ jsxs(Popover.Detail, {
			identifier: "copy",
			className: "flex min-w-64 flex-col gap-3 p-3 text-sm",
			xAlign: PopoverXAlign.END,
			children: [/* @__PURE__ */ jsx("strong", { children: title }), /* @__PURE__ */ jsx("p", {
				className: "text-neutral",
				children: description
			})]
		})]
	});
};

//#endregion
export { CopyCode };
//# sourceMappingURL=CopyCode.mjs.map