import{c as e,n as t,r as n,t as r}from"./Seo-DIwHowcX.js";import{B as i,T as a,U as o,W as s,c,j as l,n as u}from"./index-BXpSodsH.js";import{t as d}from"./PageHero-DT6BvojU.js";var f=e(n(),1),p=t();function m(){let e=i(a),t=i(l),[n,m]=(0,f.useState)(`All`),[h,g]=(0,f.useState)(null),_=(0,f.useMemo)(()=>[`All`,...new Set((e??[]).map(e=>e.category))],[e]),v=(e??[]).filter(e=>n===`All`||e.category===n);return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(r,{title:`Gallery — ${t?.company_name??`Touch Therapies Antigua`}`,description:`Moments of pure calm from our Antigua wellness sanctuary — treatments, the island, and the spaces in between.`}),(0,p.jsx)(d,{kicker:`Gallery`,title:`Moments of Pure Calm`,image:e?.[1]?.src}),(0,p.jsx)(`section`,{className:`py-20`,children:(0,p.jsxs)(`div`,{className:`wrap`,children:[(0,p.jsx)(c,{className:`mb-10 flex flex-wrap justify-center gap-3`,children:_.map(e=>(0,p.jsx)(`button`,{type:`button`,onClick:()=>m(e),className:`cursor-pointer rounded-full px-6 py-2.5 text-[0.88rem] font-semibold transition-all ${n===e?`bg-palm-500 text-white shadow-[0_10px_22px_-8px_rgb(45_106_79/0.55)]`:`bg-sand text-ink hover:bg-palm-100`}`,children:e},e))}),(0,p.jsx)(c,{children:(0,p.jsx)(u,{images:v,onOpen:g})})]})}),(0,p.jsx)(s,{children:h!==null&&v[h]&&(0,p.jsxs)(o.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`fixed inset-0 z-[80] flex items-center justify-center bg-forest-900/90 p-6 backdrop-blur-sm`,onClick:()=>g(null),children:[(0,p.jsx)(`button`,{type:`button`,"aria-label":`Close`,className:`absolute top-6 right-8 text-4xl text-white/80 transition-colors hover:text-white`,children:`×`}),(0,p.jsx)(o.img,{src:v[h].src.replace(/w=\d+/,`w=1600`),alt:v[h].alt,initial:{scale:.92},animate:{scale:1},className:`max-h-[85vh] max-w-full rounded-2xl object-contain shadow-2xl`,onClick:e=>e.stopPropagation()},v[h].id)]})})]})}export{m as default};