import{d as k,ak as P,W as e,Y as n,Z as c,a4 as o,aa as v,ae as R,al as C,r as l,a2 as S,bF as U,a5 as g,ai as V,a3 as q,a7 as y,ab as D,ac as F,$ as M,a6 as T}from"./index-c17d3913.js";import{_ as E}from"./post-skeleton-40e81755.js";import{_ as L}from"./main-nav.vue_vue_type_style_index_0_lang-d6b3b6a4.js";import{_ as W}from"./List-28c5febd.js";import{_ as Y}from"./Pagination-84d10fc7.js";import{a as Z,_ as j}from"./Skeleton-ca436747.js";const A={class:"avatar"},G={class:"base-info"},H={class:"username"},J={class:"uid"},K=k({__name:"contact-item",props:{contact:null},setup(s){const p=P(),m=t=>{p.push({name:"user",query:{username:t}})};return(t,a)=>{const _=R;return e(),n("div",{class:"contact-item",onClick:a[0]||(a[0]=u=>m(s.contact.username))},[c("div",A,[o(_,{size:"large",src:s.contact.avatar},null,8,["src"])]),c("div",G,[c("div",H,[c("strong",null,v(s.contact.nickname),1),c("span",null," @"+v(s.contact.username),1)]),c("div",J,"UID. "+v(s.contact.user_id),1)])])}}});const O=C(K,[["__scopeId","data-v-c1adabb1"]]),Q={key:0,class:"pagination-wrap"},X={key:0,class:"skeleton-wrap"},ee={key:1},te={key:0,class:"empty-wrap"},ae=k({__name:"Contacts",setup(s){const p=M(),m=V(),t=l(!1),a=l([]),_=l(+m.query.p||1),u=l(20),d=l(0),b=i=>{_.value=i,f()};S(()=>{f()});const f=(i=!1)=>{a.value.length===0&&(t.value=!0),U({page:_.value,page_size:u.value}).then(r=>{t.value=!1,a.value=r.list,d.value=Math.ceil(r.pager.total_rows/u.value),i&&setTimeout(()=>{window.scrollTo(0,99999)},50)}).catch(r=>{t.value=!1})};return(i,r)=>{const w=L,$=Y,x=E,z=Z,B=O,I=j,N=W;return e(),n("div",null,[o(w,{title:"好友"}),o(N,{class:"main-content-wrap",bordered:""},{footer:g(()=>[d.value>1?(e(),n("div",Q,[o($,{page:_.value,"onUpdate:page":b,"page-slot":q(p).state.collapsedRight?5:8,"page-count":d.value},null,8,["page","page-slot","page-count"])])):y("",!0)]),default:g(()=>[t.value?(e(),n("div",X,[o(x,{num:u.value},null,8,["num"])])):(e(),n("div",ee,[a.value.length===0?(e(),n("div",te,[o(z,{size:"large",description:"暂无数据"})])):y("",!0),(e(!0),n(D,null,F(a.value,h=>(e(),T(I,{key:h.user_id},{default:g(()=>[o(B,{contact:h},null,8,["contact"])]),_:2},1024))),128))]))]),_:1})])}}});const ue=C(ae,[["__scopeId","data-v-f767ce40"]]);export{ue as default};