import{a as U,V as $,S as b}from"./virtual-akr7sWHM.js";import{M as V}from"./MkFolder-7Ekk-Fp4.js";import{M as _}from"./MkPagination-urywMrXv.js";import{M as m}from"./MkGalleryPostPreview-Jw-bKwU4.js";import{aB as Q,i,a4 as W,a as O,d as X,M as Y,n as Z}from"./app-JmgyQoR0.js";import{b as ee,a as N,w as R,c as T,e as te,D as w,h as t,i as d,j as e,l as a,z as s,t as p,K as S,E as M,u as r,F as u,G as k,H as x,I as ae,J as le}from"./vue-y3KLWBaS.js";const P=c=>(ae("data-v-55c525fc"),c=c(),le(),c),se=P(()=>r("i",{class:"ph-clock ph-bold ph-lg"},null,-1)),oe={class:"vfpdbgtk"},ne=P(()=>r("i",{class:"ph-fire-simple ph-bold ph-lg"},null,-1)),ie={class:"vfpdbgtk"},re={class:"vfpdbgtk"},de={class:"buttoncontainer"},pe=P(()=>r("i",{class:"ph-plus ph-bold ph-lg"},null,-1)),ue={class:"vfpdbgtk"},ce=ee({__name:"index",props:{tag:{}},setup(c){const C=Q(),B=c,g=["explore","liked","my"];let o=N(g[0]);R(o,()=>y(g.indexOf(o.value)));let I=N();const D={endpoint:"gallery/posts",limit:6},F={endpoint:"gallery/featured",limit:5},G={endpoint:"i/gallery/posts",limit:5},H={endpoint:"i/gallery/likes",limit:5};R(()=>B.tag,()=>{I.value&&I.value.tags.toggleContent(B.tag==null)});const q=T(()=>[{icon:"ph-plus ph-bold ph-lg",text:i.ts.create,handler:()=>{C.push("/gallery/new")}}]),E=T(()=>[{key:"explore",title:i.ts.gallery,icon:"ph-image-square ph-bold ph-lg"},{key:"liked",title:i.ts._gallery.liked,icon:"ph-heart ph-bold ph-lg"},{key:"my",title:i.ts._gallery.my,icon:"ph-crown-simple ph-bold ph-lg"}]);W({title:i.ts.gallery,icon:"ph-image-square ph-bold ph-lg"});let v=null;function K(h){v=h,y(g.indexOf(o.value))}function j(){o.value=g[v.activeIndex]}function y(h){v.slideTo(h)}te(()=>{y(g.indexOf(o.value))});function z(){C.push("/gallery/new")}return(h,f)=>{const A=w("MkPageHeader"),J=w("MkSpacer"),L=w("MkStickyContainer");return t(),d(L,null,{header:e(()=>[a(A,{tab:o.value,"onUpdate:tab":f[0]||(f[0]=n=>o.value=n),actions:q.value,tabs:E.value,"display-back-button":!0},null,8,["tab","actions","tabs"])]),default:e(()=>[a(J,{"content-max":1200},{default:e(()=>[a(s(U),{"round-lengths":!0,"touch-angle":25,threshold:10,centeredSlides:!0,modules:[s($)],"space-between":20,virtual:!0,"allow-touch-move":s(O).state.swipeOnMobile&&(s(X)!=="desktop"||s(O).state.swipeOnDesktop),onSwiper:K,onSlideChange:j},{default:e(()=>[a(s(b),null,{default:e(()=>[o.value=="explore"?(t(),p(u,{key:0},[a(V,{class:"_gap"},{header:e(()=>[se,S(" "+M(s(i).ts.recentPosts),1)]),default:e(()=>[a(_,{pagination:D,"disable-auto-load":!0},{default:e(({items:n})=>[r("div",oe,[(t(!0),p(u,null,k(n,l=>(t(),d(m,{key:l.id,post:l,class:"post"},null,8,["post"]))),128))])]),_:1})]),_:1}),a(V,{class:"_gap"},{header:e(()=>[ne,S(" "+M(s(i).ts.popularPosts),1)]),default:e(()=>[a(_,{pagination:F,"disable-auto-load":!0},{default:e(({items:n})=>[r("div",ie,[(t(!0),p(u,null,k(n,l=>(t(),d(m,{key:l.id,post:l,class:"post"},null,8,["post"]))),128))])]),_:1})]),_:1})],64)):x("",!0)]),_:1}),a(s(b),null,{default:e(()=>[o.value=="liked"?(t(),d(_,{key:0,pagination:H},{default:e(({items:n})=>[r("div",re,[(t(!0),p(u,null,k(n,l=>(t(),d(m,{key:l.id,post:l.post,class:"post"},null,8,["post"]))),128))])]),_:1})):x("",!0)]),_:1}),a(s(b),null,{default:e(()=>[o.value=="my"?(t(),p(u,{key:0},[r("div",de,[a(Y,{class:"new primary",onClick:f[1]||(f[1]=n=>z())},{default:e(()=>[pe,S(" "+M(s(i).ts.postToGallery),1)]),_:1})]),a(_,{pagination:G},{default:e(({items:n})=>[r("div",ue,[(t(!0),p(u,null,k(n,l=>(t(),d(m,{key:l.id,post:l,class:"post"},null,8,["post"]))),128))])]),_:1})],64)):x("",!0)]),_:1})]),_:1},8,["modules","allow-touch-move"])]),_:1})]),_:1})}}}),ve=Z(ce,[["__scopeId","data-v-55c525fc"]]);export{ve as default};
