"use client"; import { useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import Link from "next/link"; import Image from "next/image"; import { ChevronRight, X, ChevronLeft, ChevronRight as ChevronRightIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; const categories = [ { id: "all", label: "All Photos" }, { id: "livestock", label: "Livestock" }, { id: "facilities", label: "Facilities" }, { id: "landscape", label: "Landscape" }, { id: "production", label: "Production" }, ]; const galleryImages = [ { id: 1, title: "Agro Tourism", description: "Experience farm life through our agro-tourism program", category: "facilities", image: "/images/gallery/Agro-Tourism.jpg" }, { id: 2, title: "Cattle Breeding Program", description: "Our premium cattle breeding facility with modern genetics", category: "livestock", image: "/images/gallery/Cattle Breeding.jpg" }, { id: 3, title: "Cattle Breeding Excellence", description: "Advanced breeding techniques for superior dairy cattle", category: "livestock", image: "/images/gallery/Cattle Breeding 1.jpg" }, { id: 4, title: "Breeding Operations", description: "State-of-the-art breeding facilities and practices", category: "livestock", image: "/images/gallery/Cattle Breeding 2.jpg" }, { id: 5, title: "Healthy Cattle", description: "Well-maintained dairy cattle in optimal conditions", category: "livestock", image: "/images/gallery/cattle.jpg" }, { id: 6, title: "Dairy Cattle", description: "High-quality dairy cattle producing premium milk", category: "livestock", image: "/images/gallery/Dairy cattle.jpg" }, { id: 7, title: "Milk Production Facility", description: "Modern automated milking parlor with latest technology", category: "production", image: "/images/gallery/Milk-Production-2-scaled.jpg" }, { id: 8, title: "Nakitooma Ranch Aerial View", description: "Panoramic view of our expansive farming operations", category: "landscape", image: "/images/gallery/Nakitooma-Ranch-drone image.jpg" }, { id: 9, title: "Silage & Hay Production", description: "Quality feed production for year-round livestock nutrition", category: "production", image: "/images/gallery/Silage-Hay-Production-1-scaled.jpg" }, ]; export default function GalleryPage() { const [activeCategory, setActiveCategory] = useState("all"); const [selectedImage, setSelectedImage] = useState(null); const [viewMode, setViewMode] = useState<"grid" | "masonry">("grid"); const filteredImages = activeCategory === "all" ? galleryImages : galleryImages.filter((img) => img.category === activeCategory); const currentIndex = selectedImage ? filteredImages.findIndex((img) => img.id === selectedImage.id) : -1; const handlePrevious = () => { if (currentIndex > 0) { setSelectedImage(filteredImages[currentIndex - 1]); } }; const handleNext = () => { if (currentIndex < filteredImages.length - 1) { setSelectedImage(filteredImages[currentIndex + 1]); } }; return ( <>

Photo Gallery

Explore our farm through stunning imagery showcasing our facilities, livestock, and daily operations.

{categories.map((category) => ( ))}
{filteredImages.map((image, index) => ( setSelectedImage(image)} >
{image.title}

{image.title}

{image.description}

))} {filteredImages.length === 0 && (

No images found in this category.

)}
{selectedImage && ( setSelectedImage(null)} > {currentIndex > 0 && ( )} {currentIndex < filteredImages.length - 1 && ( )} e.stopPropagation()} > {selectedImage.title}

{selectedImage.title}

{selectedImage.description}

{selectedImage.category}
)}
); }