1import{r as s,s as v,j as t}from"./index-BiXu8FMX.js";import{S as g,a as h}from"./SiteFooter-H3Y0k5GM.js";import"./index-D3Dvtaho.js";import"./select-6oGEAdA8.js";const i={"catered-dinners":"Catered Dinners","corporate-events":"Corporate Events",formals:"Formals","product-launches":"Product Launches","watch-parties":"Watch Parties","speaker-series":"Speaker Series","cocktails-mixers":"Cocktails & Mixers","student-events":"Student Events","live-performances":"Live Performances",receptions:"Receptions","venue-space":"Venue Space"};function N(){const[n,p]=s.useState([]),[a,c]=s.useState(null),[o,d]=s.useState("all");s.useEffect(()=>{let e=!1;return v.from("gallery_photos").select("id,image_url,alt,event_type,caption,sort_order").eq("active",!0).order("sort_order",{ascending:!0}).then(({data:b})=>{e||p((b??[]).map(r=>({id:r.id,src:r.image_url,alt:r.alt,eventType:r.event_type,caption:r.caption||void 0})))}),()=>{e=!0}},[]);const x=s.useMemo(()=>Array.from(new Set(n.map(e=>e.eventType).filter(Boolean))),[n]),m=["all","venue-space"],u=x.filter(e=>e!=="venue-space"),l=o==="all"?n:n.filter(e=>e.eventType===o);return t.jsxs("div",{className:"min-h-screen flex flex-col bg-background",children:[t.jsx(g,{}),t.jsx("section",{className:"border-b border-border bg-background",children:t.jsxs("div",{className:"mx-auto max-w-6xl px-6 lg:px-10 pt-20 pb-10 lg:pt-28 lg:pb-14",children:[t.jsx("h1",{className:"font-display text-5xl md:text-6xl lg:text-7xl tracking-tight text-navy",children:"Gallery"}),t.jsx("p",{className:"mt-4 text-lg text-[color:var(--navy-mid)] font-light max-w-xl",children:"A look inside The Ivy at The Pitch."}),t.jsxs("p",{className:"mt-6 text-[10px] uppercase tracking-[0.25em] text-[color:var(--navy-mid)]",children:[l.length," ",l.length===1?"frame":"frames"]}),t.jsx("div",{className:"mt-8 flex flex-wrap gap-2",children:m.map(e=>t.jsx("button",{type:"button",onClick:()=>d(e),className:`text-[10px] uppercase tracking-[0.2em] font-semibold px-4 py-2 rounded-full border transition-colors ${o===e?"bg-navy text-background border-navy":"bg-navy/10 text-navy border-navy hover:bg-navy/20"}`,children:e==="all"?"All":i[e]},e))}),t.jsx("div",{className:"mt-3 flex flex-wrap gap-2",children:u.map(e=>t.jsx("button",{type:"button",onClick:()=>d(e),className:`text-[10px] uppercase tracking-[0.2em] font-semibold px-4 py-2 rounded-full border transition-colors ${o===e?"bg-navy text-background border-navy":"bg-background text-navy border-border hover:border-navy"}`,children:i[e]},e))})]})}),t.jsx("main",{className:"mx-auto max-w-6xl w-full px-6 lg:px-10 py-12 md:py-16",children:l.length>0?t.jsx("div",{className:"columns-1 sm:columns-2 lg:columns-3 gap-5 space-y-5",children:l.map(e=>t.jsxs("button",{type:"button",onClick:()=>c(e),className:"group block w-full break-inside-avoid overflow-hidden rounded-sm bg-muted relative",children:[t.jsx("img",{src:e.src,alt:e.alt,loading:"lazy",className:"w-full h-auto object-cover transition-transform duration-700 group-hover:scale-[1.03]"}),t.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-navy/70 via-navy/0 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),e.eventType&&t.jsx("span",{className:"absolute top-3 left-3 text-[9px] uppercase tracking-[0.2em] font-semibold text-navy bg-background/90 backdrop-blur-sm px-2.5 py-1 rounded-full shadow-sm",children:i[e.eventType]})]},e.id))}):t.jsx("p",{className:"text-center text-[color:var(--navy-mid)] font-light py-20",children:"No media yet for this space."})}),a&&t.jsxs("div",{className:"fixed inset-0 z-[100] bg-navy/95 backdrop-blur-sm flex items-center justify-center p-4 md:p-10",onClick:()=>c(null),role:"dialog","aria-modal":"true",children:[t.jsx("button",{type:"button",onClick:()=>c(null),className:"absolute top-5 right-5 text-background text-[10px] uppercase tracking-[0.25em] font-semibold border border-background/40 rounded-full px-4 py-2 hover:bg-background hover:text-navy transition-colors",children:"Close"}),t.jsxs("div",{className:"max-w-5xl w-full",onClick:e=>e.stopPropagation(),children:[t.jsx("img",{src:a.src,alt:a.alt,className:"w-full max-h-[80vh] object-contain"}),a.caption&&t.jsx("p",{className:"mt-4 text-center text-[11px] uppercase tracking-[0.25em] font-semibold text-background/80",children:a.caption})]})]}),t.jsx(h,{hideVisitSection:!0}
1)]})}export{N as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.