"use client"; import { useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { X, ZoomIn } from "lucide-react"; import Image from "next/image"; const photos = [ { id: 1, categoryKey: "beach", url: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&q=80&w=1200" }, { id: 3, categoryKey: "restaurant", url: "https://images.unsplash.com/photo-1414235077428-338989a2e8c0?auto=format&fit=crop&q=80&w=1200" }, { id: 4, categoryKey: "beach", url: "https://images.unsplash.com/photo-1519046904884-53103b34b206?auto=format&fit=crop&q=80&w=1200" }, { id: 5, categoryKey: "events", url: "https://images.unsplash.com/photo-1511285560929-80b456fea0bc?auto=format&fit=crop&q=80&w=1200" }, { id: 6, categoryKey: "restaurant", url: "https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&q=80&w=1200" }, ]; export default function Gallery({ dict, dbPhotos }: { dict: any, dbPhotos?: any[] }) { const categories = [ { key: "all", label: dict.gallery.categories.all }, { key: "beach", label: dict.gallery.categories.beach }, { key: "restaurant", label: dict.gallery.categories.restaurant }, { key: "events", label: dict.gallery.categories.events } ]; const [activeCategoryKey, setActiveCategoryKey] = useState("all"); const [selectedImage, setSelectedImage] = useState(null); const displayPhotos = dbPhotos && dbPhotos.length > 0 ? dbPhotos.map(p => ({ id: p.id, categoryKey: p.category, url: p.imageUrl, title: p.title })) : photos; const filteredPhotos = activeCategoryKey === "all" ? displayPhotos : displayPhotos.filter((p) => p.categoryKey === activeCategoryKey); return ( ); }