import { jsxs as i, jsx as e } from "react/jsx-runtime";
import { Menu as l, MenuButton as a, MenuItems as c, MenuItem as m } from "@headlessui/react";
import { PersonFillW700 as w } from "@material-symbols-svg/react-rounded/icons/person";
import { p as u, I as d } from "../../config-BDnHptBC.js";
import { getThemeCssVariables as g } from "../../theme/getThemeCssVariables.js";
const C = () => {
  const { walletSignIn: t, walletSignOut: n, isConnected: o } = u(), s = d(), r = g(s);
  return /* @__PURE__ */ i(l, { children: [
    /* @__PURE__ */ e(a, { className: "outline-none", children: /* @__PURE__ */ e("div", { className: "px-sw-md cursor-pointer", children: /* @__PURE__ */ e(w, { className: "w-sw-2xl h-sw-2xl text-sw-gray-200 hover:text-sw-gray-50" }) }) }),
    /* @__PURE__ */ e(
      c,
      {
        anchor: "bottom",
        style: r,
        className: "sw mt-sw-lg outline-none",
        children: /* @__PURE__ */ e(m, { children: /* @__PURE__ */ e(
          "button",
          {
            type: "button",
            onClick: () => {
              if (o) {
                if (!n)
                  throw new Error(
                    "A walletSignOut function was not provided via the widget config"
                  );
                n?.();
                return;
              }
              if (!t)
                throw new Error(
                  "A walletSignIn function was not provided via the widget config"
                );
              t?.();
            },
            className: "w-full flex items-center gap-sw-md outline-none px-sw-lg py-sw-sm rounded-sw-sm text-sm text-sw-gray-200 bg-sw-gray-900 border border-sw-gray-800 select-none cursor-pointer data-focus:outline-none",
            children: o ? "Disconnect" : "Connect Wallet"
          }
        ) })
      }
    )
  ] });
};
export {
  C as WidgetProfileButton
};
//# sourceMappingURL=WidgetProfileButton.js.map
