import{X as d}from"./MkUserList-DmXj88Tc.js";import{M as g}from"./MkFolder-DXwFMXde.js";import{_ as X}from"./MkTab.vue_vue_type_style_index_0_lang-Cn_SAquG.js";import{d as V,b as p,$ as k,_ as j}from"./app-QjDgb7aF.js";import{b as D,w as S,E as A,j as l,g as u,i as e,k as a,q as o,D as r,u as s,I as q,p as c,F as U,J as n,H as h,G as F,a as _,f as I}from"./vue-Cm77DuTi.js";const O={value:"local"},z={value:"remote"},G={key:0},H={key:1},J={class:"vxjfqztj"},K=D({__name:"explore.users",props:{tag:{}},setup(m){const v=m;let f=_("local"),b=_(),w=_([]),x=_([]);S(()=>v.tag,()=>{b.value&&b.value.toggleContent(v.tag==null)});const M=I(()=>({endpoint:"hashtags/users",limit:30,params:{tag:v.tag,origin:"combined",sort:"+follower"}})),P={endpoint:"pinned-users"},C={endpoint:"users",limit:10,noPaging:!0,params:{state:"alive",origin:"local",sort:"+follower"}},L={endpoint:"users",limit:10,noPaging:!0,params:{origin:"local",sort:"+updatedAt"}},$={endpoint:"users",limit:10,noPaging:!0,params:{origin:"local",state:"alive",sort:"+createdAt"}},B={endpoint:"users",limit:10,noPaging:!0,params:{state:"alive",origin:"remote",sort:"+follower"}},E={endpoint:"users",limit:10,noPaging:!0,params:{origin:"combined",sort:"+updatedAt"}},N={endpoint:"users",limit:10,noPaging:!0,params:{origin:"combined",sort:"+createdAt"}};return V("hashtags/list",{sort:"+attachedLocalUsers",attachedToLocalUserOnly:!0,limit:30}).then(y=>{w.value=y}),V("hashtags/list",{sort:"+attachedRemoteUsers",attachedToRemoteUserOnly:!0,limit:30}).then(y=>{x.value=y}),(y,t)=>{const R=A("MkA"),T=A("MkSpacer");return l(),u(T,{"content-max":1200},{default:e(()=>[a(X,{modelValue:s(f),"onUpdate:modelValue":t[0]||(t[0]=i=>q(f)?f.value=i:f=i),style:{"margin-bottom":"var(--margin)"}},{default:e(()=>[o("option",O,r(s(p).ts.local),1),o("option",z,r(s(p).ts.remote),1)]),_:1},8,["modelValue"]),s(f)==="local"?(l(),c("div",G,[m.tag==null?(l(),c(U,{key:0},[a(g,{class:"_gap","persist-key":"explore-pinned-users"},{header:e(()=>[t[1]||(t[1]=o("i",{class:"ph-bookmark ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.pinnedUsers),1)]),default:e(()=>[a(d,{pagination:P})]),_:1}),s(k)!=null?(l(),u(g,{key:0,class:"_gap","persist-key":"explore-popular-users"},{header:e(()=>[t[2]||(t[2]=o("i",{class:"ph-chart-line-up ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.popularUsers),1)]),default:e(()=>[a(d,{pagination:C})]),_:1})):h("",!0),s(k)!=null?(l(),u(g,{key:1,class:"_gap","persist-key":"explore-recently-updated-users"},{header:e(()=>[t[3]||(t[3]=o("i",{class:"ph-activity ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.recentlyUpdatedUsers),1)]),default:e(()=>[a(d,{pagination:L})]),_:1})):h("",!0),s(k)!=null?(l(),u(g,{key:2,class:"_gap","persist-key":"explore-recently-registered-users"},{header:e(()=>[t[4]||(t[4]=o("i",{class:"ph-butterfly ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.recentlyRegisteredUsers),1)]),default:e(()=>[a(d,{pagination:$})]),_:1})):h("",!0)],64)):h("",!0)])):(l(),c("div",H,[a(g,{ref_key:"tagsEl",ref:b,foldable:!0,expanded:!1,class:"_gap"},{header:e(()=>[t[5]||(t[5]=o("i",{class:"ph-compass ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.popularTags),1)]),default:e(()=>[o("div",J,[(l(!0),c(U,null,F(s(w),i=>(l(),u(R,{key:"local:"+i.tag,to:`/tags/${i.tag}`,class:"local"},{default:e(()=>[n(r(i.tag),1)]),_:2},1032,["to"]))),128)),(l(!0),c(U,null,F(s(x),i=>(l(),u(R,{key:"remote:"+i.tag,to:`/tags/${i.tag}`},{default:e(()=>[n(r(i.tag),1)]),_:2},1032,["to"]))),128))])]),_:1},512),m.tag!=null?(l(),u(g,{key:`${m.tag}`,class:"_gap"},{header:e(()=>[t[6]||(t[6]=o("i",{class:"ph-hash ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(m.tag),1)]),default:e(()=>[a(d,{pagination:M.value},null,8,["pagination"])]),_:1})):h("",!0),m.tag==null&&s(k)!=null?(l(),c(U,{key:1},[a(g,{class:"_gap"},{header:e(()=>[t[7]||(t[7]=o("i",{class:"ph-chart-line-up ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.popularUsers),1)]),default:e(()=>[a(d,{pagination:B})]),_:1}),a(g,{class:"_gap"},{header:e(()=>[t[8]||(t[8]=o("i",{class:"ph-activity ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.recentlyUpdatedUsers),1)]),default:e(()=>[a(d,{pagination:E})]),_:1}),a(g,{class:"_gap"},{header:e(()=>[t[9]||(t[9]=o("i",{class:"ph-rocke-launch ph-bold ph-lg ph-fw",style:{"margin-right":"0.5em"}},null,-1)),n(r(s(p).ts.recentlyDiscoveredUsers),1)]),default:e(()=>[a(d,{pagination:N})]),_:1})],64)):h("",!0)]))]),_:1})}}}),te=j(K,[["__scopeId","data-v-49e401ad"]]);export{te as X};
//# sourceMappingURL=explore.users-CF98Gym3.js.map
