import{b as i,ak as U,aH as V,am as N,_ as x}from"./app-QjDgb7aF.js";import{_ as v}from"./MkNumber.vue_vue_type_script_setup_true_lang-DCqylJGQ.js";import{b as F,a as g,E as c,j as l,p as n,q as s,D as d,u as t,H as f,t as I,x as j,k as a,i as S,g as M,I as D,F as z,G as E,J as y,y as H}from"./vue-Cm77DuTi.js";const L={class:"_panel user-card"},q={key:0,class:"followed"},G={class:"title"},J={class:"username"},P={key:1,style:{opacity:"0.7"}},R={key:1,class:"fields"},T={class:"name"},X={class:"value"},Y={class:"status"},K={class:"buttons"},O=F({__name:"MkUserInfo",props:{user:{},detailed:{type:Boolean}},setup(e){const m=e;let k=g(m.detailed&&m.user.description&&(m.user.description.split(`
`).length>9||m.user.description.length>400)),u=g(k.value);return(o,w)=>{const b=c("MkAvatar"),C=c("MkUserName"),$=c("MkA"),A=c("MkAcct"),h=c("Mfm");return l(),n("article",L,[s("div",{class:j(["banner",{detailed:e.detailed}]),style:I(e.user.bannerUrl?`background-image: url(${e.user.bannerUrl})`:"")},[o.$i&&o.$i.id!=e.user.id&&e.user.isFollowed?(l(),n("span",q,d(t(i).ts.followsYou),1)):f("",!0)],6),s("h3",G,[a(b,{class:"avatar",user:e.user,"disable-preview":!0,"show-indicator":!0},null,8,["user"]),a($,{class:"name",to:t(U)(e.user)},{default:S(()=>[a(C,{user:e.user,nowrap:!0},null,8,["user"])]),_:1},8,["to"]),s("p",J,[a(A,{user:e.user},null,8,["user"])])]),s("div",{class:j(["description",{collapsed:t(k)&&t(u),truncate:!e.detailed}])},[e.user.description?(l(),M(h,{key:0,class:"mfm",text:e.user.description,author:e.user,i:o.$i,"custom-emojis":e.user.emojis},null,8,["text","author","i","custom-emojis"])):(l(),n("span",P,d(t(i).ts.noAccountDescription),1))],2),t(k)?(l(),M(V,{key:0,modelValue:t(u),"onUpdate:modelValue":w[0]||(w[0]=r=>D(u)?u.value=r:u=r)},null,8,["modelValue"])):f("",!0),e.user.fields.length>0&&e.detailed?(l(),n("div",R,[(l(!0),n(z,null,E(e.user.fields,(r,B)=>(l(),n("dl",{key:B,class:"field"},[s("dt",T,[a(h,{text:r.name,plain:!0,"custom-emojis":e.user.emojis,colored:!1},null,8,["text","custom-emojis"])]),s("dd",X,[a(h,{text:r.value,author:e.user,i:o.$i,"custom-emojis":e.user.emojis,colored:!1},null,8,["text","author","i","custom-emojis"])])]))),128))])):f("",!0),s("div",Y,[s("p",null,[a(v,{value:e.user.notesCount},null,8,["value"]),y(" "+d(t(i).ts.notes),1)]),s("p",null,[a(v,{value:e.user.followingCount},null,8,["value"]),y(" "+d(t(i).ts.following),1)]),s("p",null,[a(v,{value:e.user.followersCount},null,8,["value"]),y(" "+d(t(i).ts.followers),1)])]),s("div",K,[H(o.$slots,"default",{},()=>[o.$i&&e.user.id!=o.$i.id?(l(),M(N,{key:0,user:e.user},null,8,["user"])):f("",!0)],!0)])])}}}),p=x(O,[["__scopeId","data-v-d58d1cfb"]]);export{p as M};
//# sourceMappingURL=MkUserInfo-Brwzwv5t.js.map
