import{a as C,V as O,S as d}from"./virtual-akr7sWHM.js";import{X as P}from"./MkNotes-Z5KXbZLG.js";import{X}from"./MkUserList-oKr58tvs.js";import{i as m,a4 as V,a as f,d as B}from"./app-JmgyQoR0.js";import{b as D,c as s,a as H,w as I,e as N,D as u,h as R,i as T,j as o,l as e,z as t}from"./vue-y3KLWBaS.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"./MkUserInfo-NOodgOlv.js";import"./MkNumber.vue_vue_type_script_setup_true_lang-gu4zp81q.js";import"./number-rE36t967.js";const Z=D({__name:"tag",props:{tag:{}},setup(h){const l=h,g={endpoint:"notes/search-by-tag",limit:10,params:s(()=>({tag:l.tag}))},b={endpoint:"users/search",limit:10,params:s(()=>({query:`#${l.tag}`,origin:"combined"}))},n=["notes","users"];let a=H(n[0]);I(a,()=>p(n.indexOf(a.value)));const _=s(()=>[]),k=s(()=>[{key:"notes",icon:"ph-note ph-bold ph-lg",title:m.ts.notes},{key:"users",icon:"ph-users ph-bold ph-lg",title:m.ts.users}]);let i=null;function v(r){i=r,p(n.indexOf(a.value))}function S(){a.value=n[i.activeIndex]}function p(r){i.slideTo(r)}return N(()=>{p(n.indexOf(i.activeIndex))}),V(s(()=>({title:l.tag,icon:"ph-hash ph-bold ph-lg"}))),(r,c)=>{const w=u("MkPageHeader"),x=u("MkSpacer"),M=u("MkStickyContainer");return R(),T(M,null,{header:o(()=>[e(w,{tab:a.value,"onUpdate:tab":c[0]||(c[0]=y=>a.value=y),actions:_.value,tabs:k.value,"display-back-button":!0},null,8,["tab","actions","tabs"])]),default:o(()=>[e(x,{"content-max":800},{default:o(()=>[e(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(B)!=="desktop"||t(f).state.swipeOnDesktop),onSwiper:v,onSlideChange:S},{default:o(()=>[e(t(d),null,{default:o(()=>[e(P,{ref:"notes",pagination:g},null,512)]),_:1}),e(t(d),null,{default:o(()=>[e(X,{ref:"users",class:"_gap",pagination:b},null,512)]),_:1})]),_:1},8,["modules","allow-touch-move"])]),_:1})]),_:1})}}});export{Z as default};
