"use client";
import { j as i } from "../../../node_modules/.pnpm/react@19.1.0/node_modules/react/jsx-runtime.mjs";
import n, { useContext as c } from "react";
import { useClipboard as m } from "@mantine/hooks";
import u from "../../../node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.mjs";
const d = n.createContext({
  /* eslint-disable-next-line */
  resolveName: (e) => ({ data: void 0, isLoading: !1 })
}), v = d.Provider;
function C(e) {
  var t, a;
  const r = m(), { resolveName: l } = c(d), { data: o } = l(e.address);
  let s = o;
  return s || (e.address === (e == null ? void 0 : e.supportAddress) ? s = "HyperPlay Support" : e.truncate ? s = `${e.address.slice(0, 6)}..${e.address.slice(-4)}` : s = e.address), /* @__PURE__ */ i.jsx(
    "button",
    {
      onClick: () => r.copy(e.address),
      className: u(
        { body: !((t = e.classNames) != null && t.button) },
        (a = e.classNames) == null ? void 0 : a.button
      ),
      children: s
    }
  );
}
export {
  d as AddressContext,
  v as AddressProvider,
  C as default
};
//# sourceMappingURL=index.mjs.map
