'use client' import { useState } from 'react' import { motion, AnimatePresence } from 'framer-motion' import Image from 'next/image' import BougainvilleaMotif from '@/components/BougainvilleaMotif' import { useTranslations } from 'next-intl' import { X } from 'lucide-react' export default function GalleryPage() { const t = useTranslations('gallery') const [activeFilter, setActiveFilter] = useState('all') const [selectedImage, setSelectedImage] = useState(null) const filters = [ { id: 'all', label: t('filters.all') }, { id: 'rooms', label: t('filters.rooms') }, { id: 'exterior', label: t('filters.exterior') }, { id: 'view', label: t('filters.view') }, { id: 'balcony', label: t('filters.balcony') }, ] const galleryItems = [ { id: 1, category: 'rooms', title: t('items.1'), src: 'https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?auto=format&fit=crop&q=80', colSpan: 'col-span-1', }, { id: 2, category: 'exterior', title: t('items.2'), src: 'https://images.unsplash.com/photo-1596394516093-501ba68a0ba6?auto=format&fit=crop&q=80', colSpan: 'col-span-1 md:col-span-2 lg:col-span-1', }, { id: 3, category: 'view', title: t('items.3'), src: 'https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&q=80', colSpan: 'col-span-1', }, { id: 4, category: 'balcony', title: t('items.4'), src: 'https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?auto=format&fit=crop&q=80', colSpan: 'col-span-1 md:col-span-2', }, { id: 5, category: 'rooms', title: t('items.5'), src: 'https://images.unsplash.com/photo-1631049307264-da0ec9d70304?auto=format&fit=crop&q=80', colSpan: 'col-span-1', }, { id: 6, category: 'view', title: t('items.6'), src: 'https://images.unsplash.com/photo-1582719508461-905c673771fd?auto=format&fit=crop&q=80', colSpan: 'col-span-1 md:col-span-2 lg:col-span-1', }, ] const filteredItems = galleryItems.filter(item => activeFilter === 'all' || item.category === activeFilter ) return (
{/* Header Section */}

{t('title')}

{t('description')}

{/* Filter Bar */}
{filters.map((filter) => ( ))}
{/* Masonry-like Grid */} {filteredItems.map((item) => ( setSelectedImage(item.src)} tabIndex={0} onKeyDown={(e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); setSelectedImage(item.src); } }} >
{item.title}
{item.title}
))}
{/* Lightbox Overlay */} {selectedImage && ( setSelectedImage(null)} > e.stopPropagation()} > Enlarged view )}
) }