import { jsx as o } from "react/jsx-runtime";
import { Tooltip as u } from "@mui/material";
import { green as y } from "@mui/material/colors";
import { Check as a, ContentCopy as C } from "@mui/icons-material";
import d from "./hook.js";
function S({
  content: c = "",
  locale: m = "en",
  render: e = void 0,
  showTooltip: l = !0,
  ...r
}) {
  const { containerRef: s, copied: t, copy: f, texts: n } = d({ content: c, locale: m }), i = {
    fontSize: "1em"
  }, p = /* @__PURE__ */ o("span", { title: t ? "" : n.copy, ...r, style: { height: "1em", ...r.style }, children: t ? /* @__PURE__ */ o(u, { title: n.copied, placement: "bottom", arrow: !0, open: t && l, children: /* @__PURE__ */ o(a, { sx: { ...i, color: y[500] } }) }) : /* @__PURE__ */ o(C, { onClick: f, sx: { ...i, cursor: "pointer" } }) });
  return e ? e({ copyButton: p, containerRef: s }) : p;
}
export {
  S as default
};
