"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
module.exports = UserButtons;
var _jsxRuntime = require("react/jsx-runtime");
var _SessionManager = _interopRequireDefault(require("@arcblock/did-connect-react/lib/SessionManager"));
var _context = require("@arcblock/ux/lib/Locale/context");
var _selector = _interopRequireDefault(require("@arcblock/ux/lib/Locale/selector"));
var _material = require("@mui/material");
var _payment = require("../../contexts/payment");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function UserButtons() {
  const {
    t
  } = (0, _context.useLocaleContext)();
  const {
    session
  } = (0, _payment.usePaymentContext)();
  return /* @__PURE__ */(0, _jsxRuntime.jsxs)(_material.Stack, {
    direction: "row",
    sx: {
      alignItems: "center",
      justifyContent: "space-between"
    },
    children: [/* @__PURE__ */(0, _jsxRuntime.jsx)(_selector.default, {
      showText: false
    }), session?.user ? /* @__PURE__ */(0, _jsxRuntime.jsx)(_SessionManager.default, {
      session
    }) : /* @__PURE__ */(0, _jsxRuntime.jsx)(_material.Tooltip, {
      title: t("payment.checkout.login"),
      arrow: true,
      children: /* @__PURE__ */(0, _jsxRuntime.jsx)(_SessionManager.default, {
        session
      })
    })]
  });
}