import{a as t,F as g,j as n,A as S}from"./antd.c323f587.js";import{u as k,a as r,I as h}from"./Link.e66d18a6.js";import{d as T,u as F}from"./index.5fa92bd5.js";import{s as P}from"./index.a5de5d12.js";import{c as i}from"./Mustache.3156ce03.js";import"./react.dcf569d1.js";import"./Groups.164b9901.js";import"./Roles.b29dacff.js";function Q({item:a}){var m,f,d,p,y,v;const{user:s}=T(),{openLink:l}=k(),e=F(),{value:j}=r(async()=>!a.name||a.name.length==0?(s==null?void 0:s.name)||"\u533F\u540D":await i(a.name,e)||(s==null?void 0:s.name)||"\u533F\u540D",[a.name,e,s==null?void 0:s.name]),{value:c}=r(async()=>{if(!(!a.nameSuffix||a.nameSuffix.length==0))return await i(a.nameSuffix,e)},[a.nameSuffix,e]),{value:u}=r(async()=>{if(!(!a.jobTitle||a.jobTitle.length==0))return await i(a.jobTitle,e)},[a.jobTitle,e]);return t("div",{className:P.userBar,style:(m=a.styles)==null?void 0:m.default,onClick:o=>{o.stopPropagation(),l("@page:.session")},children:[s&&t(g,{children:[n(S,{className:"avatar",src:s.avatar||"about:blank",style:(f=a.styles)==null?void 0:f.avatar}),t("div",{className:"info",children:[n("div",{className:"name",children:j}),c&&n("div",{className:"name-suffix",style:(d=a.styles)==null?void 0:d.nameSuffix,children:c}),u&&n("div",{className:"job-title",style:(p=a.styles)==null?void 0:p.jobTitle,children:u})]})]}),t("div",{className:"buttons",children:[(y=a.buttons)==null?void 0:y.map((o,x)=>{var b;return n("div",{className:"button",style:(b=a.styles)==null?void 0:b.button,onClick:N=>{N.stopPropagation(),l(o.ref)},children:n(h,{name:o.icon||"@icon:Question"})},x)}),n("div",{className:"button",style:(v=a.styles)==null?void 0:v.button,onClick:o=>{o.stopPropagation(),l("@page:.home")},children:n(h,{name:"@icon:Home"})})]})]})}export{Q as default};
