import { defineComponent as f, openBlock as o, createBlock as l, unref as e, withCtx as t, createVNode as r, createElementBlock as a, Fragment as m, renderList as k, resolveDynamicComponent as y, createElementVNode as p, toDisplayString as c } from "vue";
import { ElSpace as u, ElAvatar as E, ElDropdown as g, ElDropdownMenu as h, ElDropdownItem as w, ElIcon as d } from "element-plus";
import { CaretBottom as S } from "../../node_modules/.pnpm/@element-plus_icons-vue@2.3.1_vue@3.4.21/node_modules/@element-plus/icons-vue/dist/index.mjs";
const D = ["src"], b = { key: 1 }, I = /* @__PURE__ */ f({
  __name: "person",
  props: {
    nickname: String,
    avatar: {
      type: Object,
      default() {
        return {};
      }
    },
    moreActions: {
      type: Array
    }
  },
  setup(i) {
    const s = i;
    return (A, B) => (o(), l(e(u), { style: { cursor: "pointer" } }, {
      default: t(() => [
        r(e(E)),
        r(e(g), { trigger: "click" }, {
          dropdown: t(() => [
            r(e(h), null, {
              default: t(() => [
                (o(!0), a(m, null, k(s.moreActions, (n, _) => (o(), l(e(w), { key: _ }, {
                  default: t(() => [
                    n.icon || n.iconSrc ? (o(), l(e(u), { key: 0 }, {
                      default: t(() => [
                        r(e(d), { size: 16 }, {
                          default: t(() => [
                            n.iconSrc ? (o(), a("img", {
                              key: 0,
                              src: n.iconSrc,
                              width: "16",
                              height: "16"
                            }, null, 8, D)) : (o(), l(y(n.icon), { key: 1 }))
                          ]),
                          _: 2
                        }, 1024),
                        p("span", null, c(n.label), 1)
                      ]),
                      _: 2
                    }, 1024)) : (o(), a("span", b, c(n.label), 1))
                  ]),
                  _: 2
                }, 1024))), 128))
              ]),
              _: 1
            })
          ]),
          default: t(() => [
            r(e(u), null, {
              default: t(() => [
                p("span", null, c(s.nickname || "未登录"), 1),
                r(e(d), null, {
                  default: t(() => [
                    r(e(S))
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]),
      _: 1
    }));
  }
});
export {
  I as default
};
