import{S as T,V as A,a as k}from"./virtual-BQH0NzJY.js";import{M as m}from"./MkPagePreview-BvNRcpjL.js";import{M as _}from"./MkPagination-DzUgufpZ.js";import{ax as E,aA as F,b as r,v as P,t as q,M as G,_ as J}from"./app-QjDgb7aF.js";import{b as K,w as L,f as h,c as U,E as b,j as n,g as c,i as a,k as s,u as e,p,F as v,G as y,H as w,q as S,J as z,D as Q,I as W,a as X}from"./vue-Cm77DuTi.js";import"./media-DuCIZ-3n.js";import"./charts-3gEHPHRq.js";const Y={key:0,class:"rknalgpo"},Z={key:0,class:"rknalgpo liked"},$={key:0,class:"rknalgpo my"},ee={class:"buttoncontainer"},te=K({__name:"pages",setup(ae){const x=E(),d=["featured","liked","my"];let t=X(d[0]);L(t,()=>f(d.indexOf(t.value)));const C={endpoint:"pages/featured",limit:10},V={endpoint:"i/page-likes",limit:10},B={endpoint:"i/pages",limit:10};function M(){x.push("/pages/new")}const O=h(()=>[{icon:"ph-plus ph-bold ph-lg",text:r.ts.create,handler:M}]),j=h(()=>[{key:"featured",title:r.ts._pages.featured,icon:"ph-fire-simple ph-bold ph-lg"},{key:"liked",title:r.ts._pages.liked,icon:"ph-heart ph-bold ph-lg"},{key:"my",title:r.ts._pages.my,icon:"ph-crown-simple ph-bold ph-lg"}]);F(h(()=>({title:r.ts.pages,icon:"ph-file-text ph-bold ph-lg"})));let g=null;function N(u){g=u,f(d.indexOf(t.value))}function R(){t.value=d[g.activeIndex]}function f(u){g.slideTo(u)}return U(()=>{f(d.indexOf(t.value))}),(u,i)=>{const D=b("MkPageHeader"),H=b("MkSpacer"),I=b("MkStickyContainer");return n(),c(I,null,{header:a(()=>[s(D,{tab:e(t),"onUpdate:tab":i[0]||(i[0]=o=>W(t)?t.value=o:t=o),actions:O.value,tabs:j.value},null,8,["tab","actions","tabs"])]),default:a(()=>[s(H,{"content-max":700},{default:a(()=>[s(e(T),{"round-lengths":!0,"touch-angle":25,threshold:10,centeredSlides:!0,modules:[e(A)],"space-between":20,virtual:!0,"allow-touch-move":e(P).state.swipeOnMobile&&(e(q)!=="desktop"||e(P).state.swipeOnDesktop),onSwiper:N,onSlideChange:R},{default:a(()=>[s(e(k),null,{default:a(()=>[e(t)=="featured"?(n(),p("div",Y,[s(_,{pagination:C},{default:a(({items:o})=>[(n(!0),p(v,null,y(o,l=>(n(),c(m,{key:l.id,class:"ckltabjg",page:l},null,8,["page"]))),128))]),_:1})])):w("",!0)]),_:1}),s(e(k),null,{default:a(()=>[e(t)=="liked"?(n(),p("div",Z,[s(_,{pagination:V,key:"likedPagesPagination"},{default:a(({items:o})=>[(n(!0),p(v,null,y(o,l=>(n(),c(m,{key:l.page.id,class:"ckltabjg",page:l.page},null,8,["page"]))),128))]),_:1})])):w("",!0)]),_:1}),s(e(k),null,{default:a(()=>[e(t)=="my"?(n(),p("div",$,[S("div",ee,[s(G,{class:"new primary",onClick:i[1]||(i[1]=o=>M())},{default:a(()=>[i[2]||(i[2]=S("i",{class:"ph-plus ph-bold ph-lg"},null,-1)),z(" "+Q(e(r).ts._pages.newPage),1)]),_:1})]),s(_,{pagination:B},{default:a(({items:o})=>[(n(!0),p(v,null,y(o,l=>(n(),c(m,{key:l.id,class:"ckltabjg",page:l},null,8,["page"]))),128))]),_:1})])):w("",!0)]),_:1})]),_:1},8,["modules","allow-touch-move"])]),_:1})]),_:1})}}}),de=J(te,[["__scopeId","data-v-d8b638d4"]]);export{de as default};
//# sourceMappingURL=pages-B5MA0GrP.js.map
