import{f as p,r as w,cr as _,N as B,am as R,l as r,y as T,z as V,p as q,j,R as U,o as d,c,a as i,_ as z,a0 as f,a1 as S,T as O,U as A,V as v,W as m,D as G,t as I,a7 as L,a8 as M}from"./index.2e2ba873.js";import{J as W}from"./index.f1458219.js";import{U as H}from"./MoreFeedback.7a64cae1.js";/* empty css                    */import{K as J,N as K}from"./index.36d4c5c3.js";import{_ as P}from"./plugin-vue_export-helper.21dcd24c.js";function ye(e){return p.get("https://api.bilibili.com/x/relation/tags",{params:e})}function ge(e){return p.get("https://api.bilibili.com/x/relation/tag",{params:e})}function he(e){return p.get("https://api.bilibili.com/x/relation/interrelations",{params:e}).then(w)}function xe(e){return _.request({url:"/x/relation/fans",params:e}).then(w)}function Ce(e){return _.request({url:"/x/relation/followings",params:e}).then(w)}const y=e=>(L("data-v-873dbf1c"),e=e(),M(),e),Q={class:"user-item"},X={class:"follow-info"},Y={class:"r1"},Z=["textContent"],ee={key:0,class:"r2"},te=["textContent","title"],ie={class:"r3"},oe={class:"option gray"},se=y(()=>i("svg",{class:"menu",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[i("line",{x1:"1",y1:"1",x2:"11",y2:"1","stroke-width":"2","stroke-linecap":"round"}),i("line",{x1:"1",y1:"6",x2:"11",y2:"6","stroke-width":"2","stroke-linecap":"round"}),i("line",{x1:"1",y1:"11",x2:"11",y2:"11","stroke-width":"2","stroke-linecap":"round"})],-1)),ne=["textContent"],ae={class:"f-dropdown"},le=y(()=>i("svg",{class:"add",width:"12",height:"12",viewBox:"0 0 12 12",fill:"none"},[i("line",{x1:"1",y1:"6",x2:"11",y2:"6","stroke-width":"2","stroke-linecap":"round"}),i("line",{x1:"6",y1:"1",x2:"6",y2:"11","stroke-width":"2","stroke-linecap":"round"})],-1)),ue=y(()=>i("span",null,"\u5173\u6CE8",-1)),re=[le,ue],de=B({__name:"FollowerItem",props:{item:{type:Object,required:!0},oid:{type:Number,default:0}},emits:["update","updateGroup"],setup(e,{emit:g}){const h=e,E={1:"\u5DF2\u5173\u6CE8",2:"\u5DF2\u5173\u6CE8",6:"\u5DF2\u4E92\u7C89"},D=R(),$=new H,u=r(null),{userInfo:N}=T(V());q(()=>{if(u.value){const o=h.item;$.append({avatar:o.face,iconType:(()=>{var t,a;if(((t=o.official_verify)==null?void 0:t.type)===0)return"personal";if(((a=o.official_verify)==null?void 0:a.type)===1)return"business";if(o.vip.vipStatus)return"big-vip"})(),avatarWidth:78},u.value,"follow-avatar"+o.mid)}}),j.on("relationChange",async o=>{o.mid===h.item.mid&&g("update",o.isFollow?2:0)});const x=async o=>{if(!N.value.isLogin){G("followerItem.toggleFollow");return}let t=[1,2,6].includes(o.attribute);try{await W(o.mid,t),I({content:t?"\u53D6\u5173\u6210\u529F":"\u5173\u6CE8\u6210\u529F"})}catch(a){I({content:a.message})}},C=o=>{D.push({name:"Space",query:{mid:o}})},l=r(!1),n=r(!1);return(o,t)=>{var b,k,F;const a=U("v-dropdown");return d(),c("div",Q,[i("div",{class:"follow-avatar",ref_key:"avatarRef",ref:u,onClick:t[0]||(t[0]=s=>C(e.item.mid))},null,512),i("div",X,[i("div",Y,[i("div",{class:z(["uname",{vip:e.item.vip.vipStatus>0}]),textContent:f(e.item.uname),onClick:t[1]||(t[1]=s=>C(e.item.mid))},null,10,Z)]),((b=e.item.official_verify)==null?void 0:b.desc)||e.item.sign?(d(),c("div",ee,[i("span",{class:"desc",textContent:f(((k=e.item.official_verify)==null?void 0:k.desc)||e.item.sign),title:((F=e.item.official_verify)==null?void 0:F.desc)||e.item.sign},null,8,te)])):S("",!0),i("div",ie,[O(i("div",null,[v(a,{visible:n.value,trigger:"click",onShow:t[4]||(t[4]=s=>n.value=!0),onHidden:t[5]||(t[5]=s=>n.value=!1)},{content:m(()=>[i("div",ae,[i("div",{class:"f-option",onClick:t[2]||(t[2]=s=>l.value=!0)},"\u8BBE\u7F6E\u5206\u7EC4"),i("div",{class:"f-option",onClick:t[3]||(t[3]=()=>{n.value=!1,x(e.item)})}," \u53D6\u6D88\u5173\u6CE8 ")])]),default:m(()=>[i("div",oe,[se,i("span",{textContent:f(E[e.item.attribute])},null,8,ne)])]),_:1},8,["visible"])],512),[[A,[1,2,6].includes(e.item.attribute)]]),[1,2,6].includes(e.item.attribute)?S("",!0):(d(),c("div",{key:0,class:"option",onClick:t[6]||(t[6]=s=>x(e.item))},re))])]),v(K,{zIndex:991,show:l.value,onClose:t[9]||(t[9]=s=>l.value=!1)},{default:m(()=>[v(J,{upName:e.item.uname,upid:e.item.mid,onClose:t[7]||(t[7]=()=>{l.value=!1,n.value=!1}),onSave:t[8]||(t[8]=s=>{l.value=!1,n.value=!1,g("updateGroup",s)})},null,8,["upName","upid"])]),_:1},8,["show"])])}}});var be=P(de,[["__scopeId","data-v-873dbf1c"]]);export{be as F,he as a,ye as b,Ce as c,xe as d,ge as f};
