import { jsx, jsxs } from "react/jsx-runtime";
import SessionManager from "@arcblock/did-connect-react/lib/SessionManager";
import { useLocaleContext } from "@arcblock/ux/lib/Locale/context";
import LocaleSelector from "@arcblock/ux/lib/Locale/selector";
import { Stack, Tooltip } from "@mui/material";
import { usePaymentContext } from "../../contexts/payment.js";
export default function UserButtons() {
  const { t } = useLocaleContext();
  const { session } = usePaymentContext();
  return /* @__PURE__ */ jsxs(
    Stack,
    {
      direction: "row",
      sx: {
        alignItems: "center",
        justifyContent: "space-between"
      },
      children: [
        /* @__PURE__ */ jsx(LocaleSelector, { showText: false }),
        session?.user ? /* @__PURE__ */ jsx(SessionManager, { session }) : /* @__PURE__ */ jsx(Tooltip, { title: t("payment.checkout.login"), arrow: true, children: /* @__PURE__ */ jsx(SessionManager, { session }) })
      ]
    }
  );
}
