import{a as X,V as B,S as k}from"./virtual-akr7sWHM.js";import{X as b}from"./MkNotes-Z5KXbZLG.js";import{_ as D}from"./MkTab.vue_vue_type_style_index_0_lang-bgKDPAJl.js";import{i,a4 as H,a as S,d as P}from"./app-JmgyQoR0.js";import{b as w,a as M,D as p,h as u,i as d,j as a,l as o,u as h,E as x,z as e,H as R,w as U,c as _,e as $}from"./vue-y3KLWBaS.js";import{X as z}from"./explore.users-T3E41M2s.js";import"./MkNote-Y7yPCL5J.js";import"./MkReactionsViewer-iZKN4Via.js";import"./MkReactionIcon.vue_vue_type_script_setup_true_lang-MnLL2GJr.js";import"./share-available-LNRVMfAE.js";import"./get-note-summary-7eDLQp-L.js";import"./MkDateSeparatedList.vue_vue_type_style_index_0_lang-bpwwzSpi.js";import"./MkPagination-urywMrXv.js";import"./MkUserList-oKr58tvs.js";import"./MkUserInfo-NOodgOlv.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-gu4zp81q.js";import"./number-rE36t967.js";import"./MkFolder-7Ekk-Fp4.js";const F={value:"local"},I={value:"remote"},T=w({__name:"explore.featured",setup(y){const n={endpoint:"notes/featured",limit:10,origin:"local",offsetMode:!0,params:{days:14}},t={endpoint:"notes/featured",limit:20,offsetMode:!0,params:{origin:"remote",days:7}};let r=M("local");return(v,s)=>{const c=p("MkSpacer");return u(),d(c,{"content-max":800},{default:a(()=>[o(D,{modelValue:r.value,"onUpdate:modelValue":s[0]||(s[0]=m=>r.value=m),style:{"margin-bottom":"var(--margin)"}},{default:a(()=>[h("option",F,x(e(i).ts.local),1),h("option",I,x(e(i).ts.remote),1)]),_:1},8,["modelValue"]),r.value==="local"?(u(),d(b,{key:0,pagination:n})):r.value==="remote"?(u(),d(b,{key:1,pagination:t})):R("",!0)]),_:1})}}}),j={class:"lznhrdub"},ie=w({__name:"explore",setup(y){const n=["users","featured"];let t=M(n[0]);U(t,()=>f(n.indexOf(t.value)));const r=_(()=>[]),v=_(()=>[{key:"users",icon:"ph-users ph-bold ph-lg",title:i.ts.users},{key:"featured",icon:"ph-lightning ph-bold ph-lg",title:i.ts.featured}]);H(_(()=>({title:i.ts.explore,icon:"ph-hash ph-bold ph-lg"})));let s=null;function c(l){s=l,f(n.indexOf(t.value))}function m(){t.value=n[s.activeIndex]}function f(l){s.slideTo(l)}return $(()=>{f(n.indexOf(s.activeIndex))}),(l,g)=>{const V=p("MkPageHeader"),C=p("MkSpacer"),O=p("MkStickyContainer");return u(),d(O,null,{header:a(()=>[o(V,{tab:t.value,"onUpdate:tab":g[0]||(g[0]=N=>t.value=N),actions:r.value,tabs:v.value},null,8,["tab","actions","tabs"])]),default:a(()=>[h("div",j,[o(C,{"content-max":1200},{default:a(()=>[o(e(X),{"round-lengths":!0,"touch-angle":25,threshold:10,centeredSlides:!0,modules:[e(B)],"space-between":20,virtual:!0,"allow-touch-move":e(S).state.swipeOnMobile&&(e(P)!=="desktop"||e(S).state.swipeOnDesktop),onSwiper:c,onSlideChange:m},{default:a(()=>[o(e(k),null,{default:a(()=>[o(z)]),_:1}),o(e(k),null,{default:a(()=>[o(T)]),_:1})]),_:1},8,["modules","allow-touch-move"])]),_:1})])]),_:1})}}});export{ie as default};
