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