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