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