import Image from "next/image"; import Link from "next/link"; import { ArrowRight, Star, Wind, Anchor, Utensils, BedDouble, Sun, Waves, Bike, Coffee, Music, MapPin, Camera, Heart, Compass, Fish, Mountain, Dumbbell, Leaf, Shield, Umbrella, Flame, type LucideIcon, } from "lucide-react"; import ScrollReveal from "@/components/ScrollReveal"; export const revalidate = 3600; const ICON_MAP: Record = { Wind, Anchor, Utensils, BedDouble, Sun, Star, Waves, Bike, Coffee, Music, MapPin, Camera, Heart, Compass, Fish, Mountain, Dumbbell, Leaf, Shield, Umbrella, Flame, }; import HeroVideo from "@/components/HeroVideo"; const defaultFeatures = [ { icon: "Wind", label: "Kitesurf Okulu", sub: "IKO Sertifikalı" }, { icon: "Anchor", label: "Yoga Platformu", sub: "Nehir Kenarı" }, { icon: "Utensils", label: "Restoran & Bar", sub: "Ege Mutfağı" }, { icon: "BedDouble", label: "Butik Odalar", sub: "3 Tip Konaklama" }, { icon: "Sun", label: "Gün Batımı Terası", sub: "Gökova Manzarası" }, ]; const rooms = [ { img: "https://images.unsplash.com/photo-1618773928121-c32242e63f39?q=80&w=2940&auto=format&fit=crop", badge: "Standart", badgeStyle: "bg-white/90 text-dark", name: "Standart Oda", desc: "Konforlu ve modern tasarımlı odamızda huzurlu bir konaklama.", price: "₺4.500", cta: "primary" as const, }, { img: "https://images.unsplash.com/photo-1566665797739-1674de7a421a?q=80&w=2874&auto=format&fit=crop", badge: "Popüler", badgeStyle: "bg-accent text-white", name: "Nehir Manzaralı Oda", desc: "Azmak nehrinin eşsiz manzarası eşliğinde güne uyanın.", price: "₺5.500", cta: "accent" as const, }, { img: "https://images.unsplash.com/photo-1499955085172-a104c9463ece?q=80&w=2940&auto=format&fit=crop", badge: "Premium", badgeStyle: "bg-white/90 text-dark", name: "Ahşap Bungalow", desc: "Doğayla tamamen iç içe, teraslı ve bağımsız girişli.", price: "₺7.000", cta: "primary" as const, }, ]; const testimonials = [ { text: "Akyaka'da pek çok yerde kaldım ama Kite Beach bambaşka bir deneyimdi. Nehrin sesi, kitesurf dersleri ve muhteşem kahvaltı — her şey mükemmeldi.", name: "Ayşe K.", from: "İstanbul", }, { text: "Yoga seansları ahşap platformda, sabah erken saatte, nehir manzarası eşliğinde. Kelimelerle anlatmak zor — mutlaka yaşanmalı.", name: "Marco B.", from: "İtalya", }, { text: "Eğitmenler son derece ilgili. Kitesurf derslerimden sonra bağımlısı oldum. Önümüzdeki yaz mutlaka döneceğim.", name: "Mehmet Ö.", from: "Ankara", }, ]; const testimonialsEn = [ { text: "I've stayed in many places in Akyaka, but Kite Beach was a completely different experience. The sound of the river, kitesurf lessons, and the amazing breakfast — everything was perfect.", name: "Ayse K.", from: "Istanbul", }, { text: "Yoga sessions on the wooden platform, early in the morning with a river view. Hard to put into words — a must-try.", name: "Marco B.", from: "Italy", }, { text: "The instructors are very caring. After my kitesurf lessons, I became addicted. I will definitely return next summer.", name: "Mehmet O.", from: "Ankara", }, ]; import { getDictionary, Locale } from "./dictionaries"; import prisma from "@/lib/prisma"; import { buildMeta } from "@/lib/metadata"; import type { Metadata } from "next"; export async function generateMetadata( { params }: { params: Promise<{ lang: string }> } ): Promise { const { lang } = await params; return buildMeta(lang, "", { title: "Kite Beach Akyaka | Kitesurf & Butik Otel", description: "Nehrin huzuru, denizin enerjisi — tek bir noktada. Akyaka'nın kalbinde kitesurf ve butik otel deneyimi.", }, { title: "Kite Beach Akyaka | Kitesurf & Boutique Hotel", description: "Tranquility of the river, energy of the sea — in one spot. Kitesurf and boutique hotel experience in the heart of Akyaka.", }); } async function getInstagramData() { if (!process.env.RAPIDAPI_KEY) { return []; } const url = 'https://instagram120.p.rapidapi.com/api/instagram/posts'; const options = { method: 'POST', headers: { 'x-rapidapi-key': process.env.RAPIDAPI_KEY, 'x-rapidapi-host': 'instagram120.p.rapidapi.com', 'Content-Type': 'application/json' }, body: JSON.stringify({ username: 'kitebeachakyaka', maxId: '' }), next: { revalidate: 86400 } }; try { const res = await fetch(url, options); if (!res.ok) { console.warn('Instagram API error or missing limits. Status:', res.status); return []; } const data = await res.json(); return data.result?.edges?.slice(0, 4).map((edge: any) => edge.node) || []; } catch (err) { console.warn("Instagram fetch error:", err); return []; } } export default async function Home({ params }: { params: Promise<{ lang: string }> }) { const { lang } = await params; const dict = await getDictionary(lang as Locale); const [heroDb, activities, events, dbFeatures, aboutDb, instagramPosts] = await Promise.all([ prisma.heroSection.findUnique({ where: { lang } }), prisma.activity.findMany({ where: { lang }, orderBy: { order: "asc" } }), prisma.event.findMany({ where: { lang }, orderBy: { date: "asc" } }), prisma.feature.findMany({ where: { lang }, orderBy: { order: "asc" } }), prisma.aboutSection.findUnique({ where: { lang } }), getInstagramData(), ]); const displayTestimonials = lang === "en" ? testimonialsEn : testimonials; const heroData = heroDb || { location: dict.home.location, welcome: dict.home.welcome, title: dict.home.title, subtitle: dict.home.subtitle, bookNow: dict.home.bookNow, exploreActivities: dict.home.exploreActivities, scroll: dict.home.scroll, }; const aboutData = aboutDb || { badge: lang === "en" ? "Our Story" : "Hikayemiz", titleLine1: lang === "en" ? "In the" : "Doğanın", titleLine2: lang === "en" ? "Heart of Nature" : "Kalbinde", titleHighlight: lang === "en" ? "A Special Escape" : "Özel Bir Kaçış", description1: lang === "en" ? "Located right on the banks of the Azmak River flowing into the crystal waters of the Gulf of Gokova, we are in a unique location where the wind never ceases." : "Gökova Körfezi'nin kristal sularına dökülen Azmak Nehri'nin hemen kıyısında, rüzgarın hiç eksik olmadığı eşsiz bir konumda yer alıyoruz.", description2: lang === "en" ? "Kite Beach Akyaka offers a unique living space that integrates the passion for kitesurfing with nature, comfort, and local flavors." : "Kite Beach Akyaka; kitesurf tutkusunu doğayla, konforla ve yerel lezzetlerle bütünleştiren benzersiz bir yaşam alanı sunar.", image: "https://images.unsplash.com/photo-1544551763-46a013bb70d5?q=80&w=2940&auto=format&fit=crop", statsGuestCount: "500+", statsGuestLabel: lang === "en" ? "Happy Guests" : "Mutlu Misafir", statsYearCount: "10+", statsYearLabel: lang === "en" ? "Years Experience" : "Yıl Deneyim", badgeIkoTitle: "IKO", badgeIkoLabel: lang === "en" ? "Certified" : "Sertifikalı" }; const displayFeatures = dbFeatures.length > 0 ? dbFeatures : defaultFeatures; return (
{/* ────────────────────────────────────────── HERO ────────────────────────────────────────── */}
{/* Floating season badge
Sezon Nisan — Ekim
*/}
{heroData.location}
{heroData.welcome}

{heroData.title}

{heroData.subtitle}

{heroData.exploreActivities}
{/* Scroll indicator */}
{heroData.scroll}
{/* ────────────────────────────────────────── FEATURES STRIP ────────────────────────────────────────── */}
{displayFeatures.map(({ icon, label, sub }, i) => { const IconComponent = ICON_MAP[icon as string] || Star; return (
= 2 ? "hidden md:flex" : ""}`} > {label} {sub}
); })}
{/* ────────────────────────────────────────── ABOUT ────────────────────────────────────────── */}
{aboutData.badge}
{/* Stats card */}
{aboutData.statsGuestCount} {aboutData.statsGuestLabel}
{aboutData.statsYearCount} {aboutData.statsYearLabel}
{/* IKO badge */}
{aboutData.badgeIkoTitle} {aboutData.badgeIkoLabel}
{aboutData.badge}

{aboutData.titleLine1}
{aboutData.titleLine2}
{aboutData.titleHighlight}

{aboutData.description1}

{aboutData.description2}

{lang === "en" ? "Read Our Story" : "Hikayemizi Okuyun"}
{/* ────────────────────────────────────────── ROOMS ────────────────────────────────────────── */} {/*
Konaklama

Kite Beach Akyaka Otel

Akyaka’nın en güzel köşesinde, nehrin dinginliği ile denizin sonsuz maviliğinin kucaklaştığı o özel noktadayız. Kapınızı açtığınız anda sizi karşılayan nehir kıyısının sessizliği, güne başlamak için en huzurlu davetiniz olacak. Doğanın kalbinde, nehir manzarasına karşı yaptığınız bir yoga seansıyla ruhunuzu dengelerken; hemen ardından Akyaka’nın meşhur rüzgarlarında Kite Surf ile adrenalini zirveye taşıyabilirsiniz. Günün yorgunluğunu ise, restoranımızın mutfağından çıkan lezzetlerle, Ege’nin kendine has o büyüleyici gün batımını izleyerek geride bırakın. Burada zaman, sadece sizin istediğiniz hızda akıyor.

{rooms.map((room, i) => (
{room.name} {room.badge}

{room.name}

{room.desc}

{room.price} /gece
İncele
))}
Tüm Odaları Gör
*/} {/* ────────────────────────────────────────── ACTIVITIES — BENTO GRID ────────────────────────────────────────── */}
{lang === "en" ? "What Will You Do?" : "Ne Yapacaksınız?"}

{lang === "en" ? "Activities" : "Aktiviteler"}

{lang === "en" ? "See All" : "Tümünü Gör"}
{/* Bento rows */}
{activities.length > 0 ? ( activities.map((act, i) => ( {act.title}
{act.badge && ( {act.badge} )}

{act.title}

{i === 0 && (

{act.description}

)} {i === 0 && ( )}
)) ) : (
{lang === "en" ? "No activities added yet." : "Henüz aktivite eklenmedi."}
)}
{/* ────────────────────────────────────────── EVENTS (PREVIEW) ────────────────────────────────────────── */}
{/* Background glow */}
{lang === "en" ? "Calendar" : "Takvim"}

{lang === "en" ? "Events" : "Etkinlikler"}

{lang === "en" ? "All Events" : "Tüm Etkinlikler"}
{events.length > 0 ? ( events.map((ev) => (
{ev.title}
{ev.badge && (
{ev.badge}
)}

{ev.title}

{ev.description}

{ev.date} {ev.time} {ev.location}
{lang === "en" ? "View Details" : "Detayları İncele"}
)) ) : (
{lang === "en" ? "No events added yet." : "Henüz etkinlik eklenmedi."}
)}
{/* ────────────────────────────────────────── INSTAGRAM FEED ────────────────────────────────────────── */} {instagramPosts.length > 0 && (
@kitebeachakyaka

Instagram

{instagramPosts.map((post: any) => ( {/* eslint-disable-next-line @next/next/no-img-element */} {post.caption?.text?.substring(0,

{post.caption?.text}

))}
)} {/* ────────────────────────────────────────── TESTIMONIALS ────────────────────────────────────────── */}
{lang === "en" ? "Guest Reviews" : "Misafir Yorumları"}

{lang === "en" ? "Experiences" : "Deneyimler"}

{displayTestimonials.map((t, i) => (
{/* Large decorative quote */} " {/* Stars */}
{Array.from({ length: 5 }).map((_, j) => ( ))}

"{t.text}"

{t.name[0]}
{t.name} {t.from}
))}
{/* ────────────────────────────────────────── CTA BAND ────────────────────────────────────────── */}
{lang === "en" ? "Get Started" : "Hemen Başlayın"}

{lang === "en" ? ( <>Are you ready to plan
your dream vacation? ) : ( <>Hayalindeki tatili
planlamaya hazır mısın? )}

{lang === "en" ? "The wind is calling you. Book your spot now and become a part of this unique experience." : "Rüzgar seni çağırıyor. Hemen yerini ayırt ve bu eşsiz deneyimin bir parçası ol."}

); }