"use client";
import { j as o } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import { Tooltip as l } from "@mantine/core";
import { useClipboard as m } from "@mantine/hooks";
import n from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.mjs";
import u from "./ButtonCopy.module.scss.mjs";
import a from "../../../node_modules/.pnpm/@tabler_icons-react@3.34.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.mjs";
function j({
  text: p,
  className: i,
  iconProps: e,
  tooltipProps: c,
  i18n: t = { copy: "Copy", copied: "Copied" },
  ...s
}) {
  const r = m();
  return /* @__PURE__ */ o.jsx(
    l,
    {
      label: r.copied ? t.copied : t.copy,
      position: "top",
      withArrow: !0,
      ...c,
      children: /* @__PURE__ */ o.jsx(
        "button",
        {
          type: "button",
          className: n(u.button, i),
          onClick: () => r.copy(p),
          ...s,
          children: /* @__PURE__ */ o.jsx(a, { color: "var(--color-neutral-400)", ...e })
        }
      )
    }
  );
}
export {
  j as ButtonCopy
};
//# sourceMappingURL=index.mjs.map
