"use client"; import Image from "next/image"; import { useState, use } from "react"; const getAltText = (alt: string, isEn: boolean) => { if (!isEn) return alt; const translations: Record = { "Standart Oda": "Standard Room", "Kitesurf": "Kitesurfing", "Nehir Doğa": "River Nature", "Nehir Manzaralı Oda": "River View Room", "Restoran": "Restaurant", "Yoga": "Yoga", "Bungalow": "Bungalow", "SUP": "Stand Up Paddleboarding", "Kahvaltı": "Breakfast Spread", "Bisiklet": "Bicycle Rental", "Restoran Ambiyans": "Restaurant Ambience", "Gün Batımı": "Sunset View", }; return translations[alt] || alt; }; const gallery: { src: string; alt: string; category: "Odalar" | "Aktiviteler" | "Restoran" | "Doğa" }[] = [ { src: "https://images.unsplash.com/photo-1618773928121-c32242e63f39?q=80&w=2940&auto=format&fit=crop", alt: "Standart Oda", category: "Odalar" }, { src: "https://images.unsplash.com/photo-1526367790999-0150786686a2?q=80&w=2940&auto=format&fit=crop", alt: "Kitesurf", category: "Aktiviteler" }, { src: "https://images.unsplash.com/photo-1544551763-46a013bb70d5?q=80&w=2940&auto=format&fit=crop", alt: "Nehir Doğa", category: "Doğa" }, { src: "https://images.unsplash.com/photo-1566665797739-1674de7a421a?q=80&w=2874&auto=format&fit=crop", alt: "Nehir Manzaralı Oda",category: "Odalar" }, { src: "https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?q=80&w=2940&auto=format&fit=crop", alt: "Restoran", category: "Restoran" }, { src: "https://images.unsplash.com/photo-1544367567-0f2fcb009e0b?q=80&w=2940&auto=format&fit=crop", alt: "Yoga", category: "Aktiviteler" }, { src: "https://images.unsplash.com/photo-1499955085172-a104c9463ece?q=80&w=2940&auto=format&fit=crop", alt: "Bungalow", category: "Odalar" }, { src: "https://images.unsplash.com/photo-1507525428034-b723cf961d3e?q=80&w=2940&auto=format&fit=crop", alt: "SUP", category: "Aktiviteler" }, { src: "https://images.unsplash.com/photo-1551504734-5ee1c4a1479b?q=80&w=2940&auto=format&fit=crop", alt: "Kahvaltı", category: "Restoran" }, { src: "https://images.unsplash.com/photo-1511994298241-608e28f14fde?q=80&w=2940&auto=format&fit=crop", alt: "Bisiklet", category: "Aktiviteler" }, { src: "https://images.unsplash.com/photo-1544148103-0773bf10d330?q=80&w=2940&auto=format&fit=crop", alt: "Restoran Ambiyans", category: "Restoran" }, { src: "https://images.unsplash.com/photo-1498623116890-37e912163d5d?q=80&w=2940&auto=format&fit=crop", alt: "Gün Batımı", category: "Doğa" }, ]; export default function GaleriPage({ params }: { params: Promise<{ lang: string }> }) { const { lang } = use(params); const isEn = lang === "en"; const filters = isEn ? ["All", "Rooms", "Activities", "Restaurant", "Nature"] : ["Tümü", "Odalar", "Aktiviteler", "Restoran", "Doğa"]; const [active, setActive] = useState(isEn ? "All" : "Tümü"); const [lightbox, setLightbox] = useState(null); const getInternalCategory = (filterName: string) => { if (filterName === "All" || filterName === "Tümü") return "Tümü"; if (filterName === "Rooms") return "Odalar"; if (filterName === "Activities") return "Aktiviteler"; if (filterName === "Restaurant") return "Restoran"; if (filterName === "Nature") return "Doğa"; return filterName; }; const internalActive = getInternalCategory(active); const filtered = internalActive === "Tümü" ? gallery : gallery.filter((g) => g.category === internalActive); return (
{/* Heading */}
{isEn ? "Photos" : "Fotoğraflar"}

{isEn ? "Gallery" : "Galeri"}

{isEn ? "Discover the unique nature and exciting activities of Kite Beach Akyaka." : "Kite Beach Akyaka'nın eşsiz doğasını ve heyecan verici aktivitelerini keşfedin."}

{/* Filter tabs */}
{filters.map((f) => ( ))}
{/* Grid */}
{filtered.map((img, idx) => (
setLightbox(img.src)} style={{ animation: `scale-in 0.4s cubic-bezier(0.16,1,0.3,1) ${idx * 40}ms both` }} >
{getAltText(img.alt,
{getAltText(img.alt, isEn)}
))}
{/* Lightbox */} {lightbox && (
setLightbox(null)} >
Galeri
)}
); }