import { jsx as r, jsxs as t } from "react/jsx-runtime";
import { Dropdown as a, Menu as i, Avatar as m } from "antd";
import { DownOutlined as l } from "@ant-design/icons";
import "./style.less.mjs";
import { authProvider as o } from "../../AuthProvider.mjs";
import c from "./user-default.png.mjs";
const I = () => {
  var n, e;
  const s = () => {
    o.signout();
  };
  return /* @__PURE__ */ r("span", {
    className: "user-information",
    children: /* @__PURE__ */ r(a, {
      trigger: ["click"],
      overlay: /* @__PURE__ */ r(i, {
        children: /* @__PURE__ */ r(i.Item, {
          children: /* @__PURE__ */ r("a", {
            onClick: s,
            children: "退出登录"
          })
        })
      }),
      children: /* @__PURE__ */ t("span", {
        className: "user-information-pannel",
        children: [/* @__PURE__ */ r(m, {
          size: 28,
          src: c
        }), /* @__PURE__ */ r("span", {
          style: {
            margin: 8
          },
          children: ((n = o.userInfo) == null ? void 0 : n.email) || ((e = o.userInfo) == null ? void 0 : e.phone) || "-"
        }), /* @__PURE__ */ r(l, {})]
      })
    })
  });
};
export {
  I as default
};
