import"./vue-DrbDkNea.js";import{a as b,b as k,c as C,d as E,e as B,f as L,s as d,g as I,A as V}from"./app-32jC168b.js";import{d as f}from"./@vueuse-BtXl34ON.js";import{s as $}from"./pinia-CRROJ2FJ.js";import{q as x}from"./primevue-CaJ8y7on.js";import{J as F}from"./vue-collapsed-BvAXM0zb.js";import{u as N}from"./vue-router-B7IBppZi.js";import{a6 as T,r as j,l as K,o as M,c as P,O as i,e as q,K as a,p as e,J as A,L as G,M as J,d as h,E as R,F as z}from"./@vue-DGKlPIvk.js";import"./axios-ngrFHoWO.js";import"./laravel-vue-i18n-C5luLa-D.js";import"./sprintf-js-DpPCfzXw.js";import"./justified-layout-L74SodyD.js";import"./@sidsbrmnn-BrMVzLs0.js";import"./qrcode-BCGq3iTV.js";import"./dijkstrajs-COg3n3zL.js";import"./leaflet-DWbea2Sf.js";import"./leaflet-rotatedmarker-roe_HPmI.js";import"./leaflet.markercluster-Bf27Z4aC.js";import"./@lychee-org-CcYfPfz8.js";import"./@primeuix-CE6Q5qwQ.js";import"./axios-cache-interceptor-BjQVu9ku.js";import"./cache-parser-CnAbIhaX.js";import"./fast-defer-9MI9za_P.js";import"./object-code-SBtdq8jY.js";import"./pinia-plugin-persistedstate-B8MS7Mes.js";import"./destr-BPvN1X9m.js";import"./deep-pick-omit-CegYQlcN.js";/* empty css            */import"./@primevue-BaMsWGqM.js";const D={class:"h-svh overflow-y-hidden"},ko=T({__name:"Favourites",setup(H){const v=j("favourites"),r=b(),{layoutConfig:n,loadLayoutConfig:g}=k(),{is_full_screen:m}=$(r),{onScroll:c,setScroll:y}=B(r,v),u=N();function p(){u.push({name:"gallery"})}const _=C(),s=K(()=>_.photos??[]),{selectedPhotosIds:w}=E({photos:s},r);function S(t,o){u.push({name:"album",params:{albumId:s.value[t].album_id??V,photoId:s.value[t].id}})}return f("f",()=>!d()&&r.toggleFullScreen()),f("Escape",()=>{if(d()&&document.activeElement instanceof HTMLElement){document.activeElement.blur();return}p()}),M(async()=>{const t=await Promise.allSettled([g()]);t.forEach((o,l)=>{o.status==="rejected"&&console.warn(`Promise ${l} reject with reason: ${o.reason}`)}),t.every(o=>o.status==="fulfilled")&&y()}),(t,o)=>(h(),P("div",D,[i(e(F),{when:!e(m)},{default:a(()=>[i(e(x),{class:"w-full border-0 h-14"},{start:a(()=>[i(I,{onGoBack:p})]),center:a(()=>[R(z(t.$t("gallery.favourites")),1)]),end:a(()=>[...o[1]||(o[1]=[])]),_:1})]),_:1},8,["when"]),q("div",{id:"galleryView",class:J(["relative flex flex-wrap content-start w-full justify-start overflow-y-auto",e(m)?"h-svh":"h-[calc(100vh-3.5rem)]"]),onScroll:o[0]||(o[0]=(...l)=>e(c)&&e(c)(...l))},[e(n)!==void 0&&s.value.length>0?(h(),A(L,{key:0,header:"gallery.album.header_photos",photos:s.value,"gallery-config":e(n),"photos-timeline":void 0,"photo-layout":"square","selected-photos":e(w),"is-timeline":!1,"with-control":!1,"cover-id":void 0,"header-id":void 0,onClicked:S},null,8,["photos","gallery-config","selected-photos"])):G("",!0)],34)]))}});export{ko as default};
