import{S as C,V as O,a as m}from"./virtual-BQH0NzJY.js";import{X as P}from"./MkNotes-DrVlMmnc.js";import{X}from"./MkUserList-DmXj88Tc.js";import{aA as I,v as f,t as R,b as h}from"./app-QjDgb7aF.js";import{b as V,w as A,c as B,f as s,E as u,j as H,g as N,i as o,k as a,u as t,I as T,a as U}from"./vue-Cm77DuTi.js";import"./media-DuCIZ-3n.js";import"./MkNote-RPFbRjy2.js";import"./MkReactionsViewer-D75lmVQ0.js";import"./MkReactionIcon.vue_vue_type_script_setup_true_lang-D23mNn1N.js";import"./share-available-Drgr3YiT.js";import"./get-note-summary-DlGmePWF.js";import"./MkDateSeparatedList.vue_vue_type_style_index_0_lang-87CjANkN.js";import"./MkPagination-DzUgufpZ.js";import"./MkUserInfo-Brwzwv5t.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-DCqylJGQ.js";import"./animation-wAdLxVJ8.js";import"./charts-3gEHPHRq.js";import"./number-BJeYzK3l.js";const oe=V({__name:"tag",props:{tag:{}},setup(g){const l=g,b={endpoint:"notes/search-by-tag",limit:10,params:s(()=>({tag:l.tag}))},k={endpoint:"users/search",limit:10,params:s(()=>({query:`#${l.tag}`,origin:"combined"}))},n=["notes","users"];let e=U(n[0]);A(e,()=>p(n.indexOf(e.value)));const _=s(()=>[]),S=s(()=>[{key:"notes",icon:"ph-note ph-bold ph-lg",title:h.ts.notes},{key:"users",icon:"ph-users ph-bold ph-lg",title:h.ts.users}]);let i=null;function v(r){i=r,p(n.indexOf(e.value))}function w(){e.value=n[i.activeIndex]}function p(r){i.slideTo(r)}return B(()=>{p(n.indexOf(i.activeIndex))}),I(s(()=>({title:l.tag,icon:"ph-hash ph-bold ph-lg"}))),(r,c)=>{const x=u("MkPageHeader"),M=u("MkSpacer"),y=u("MkStickyContainer");return H(),N(y,null,{header:o(()=>[a(x,{tab:t(e),"onUpdate:tab":c[0]||(c[0]=d=>T(e)?e.value=d:e=d),actions:_.value,tabs:S.value,"display-back-button":!0},null,8,["tab","actions","tabs"])]),default:o(()=>[a(M,{"content-max":800},{default:o(()=>[a(t(C),{"round-lengths":!0,"touch-angle":25,threshold:10,centeredSlides:!0,modules:[t(O)],"space-between":20,virtual:!0,"allow-touch-move":t(f).state.swipeOnMobile&&(t(R)!=="desktop"||t(f).state.swipeOnDesktop),onSwiper:v,onSlideChange:w},{default:o(()=>[a(t(m),null,{default:o(()=>[a(P,{ref:"notes",pagination:b},null,512)]),_:1}),a(t(m),null,{default:o(()=>[a(X,{ref:"users",class:"_gap",pagination:k},null,512)]),_:1})]),_:1},8,["modules","allow-touch-move"])]),_:1})]),_:1})}}});export{oe as default};
//# sourceMappingURL=tag-B_bAilRM.js.map
