import { jsx as l } from "react/jsx-runtime";
import a from "@arcblock/react-hooks/lib/useBrowser";
import { Fab as i } from "@mui/material";
import { styled as s } from "../Theme/index.js";
function c({ link: e, locale: n = "zh" }) {
  const o = n === "zh" ? "在 DID Wallet 打开" : "Open in DID Wallet", t = a();
  if (t.mobile.any && !(t.wallet || t.arcSphere) && !t.wechat) {
    const r = `abt://abtwallet.io/i?action=requestOpenUrl&url=${encodeURIComponent(e)}`;
    return /* @__PURE__ */ l(
      m,
      {
        size: "small",
        href: r,
        variant: "extended",
        color: "primary",
        rounded: !0,
        target: "_blank",
        className: "open-in-wallet-button",
        children: o
      }
    );
  }
  return null;
}
const m = s(i)`
  && {
    font-size: 12px;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform-origin: 50% 50%;
    transform: translateX(-50%);
    min-width: 120px;
    z-index: ${(e) => e.theme.zIndex.tooltip};
  }
`;
export {
  c as default
};
