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