"use client"; import { useTranslations } from 'next-intl'; import { motion } from 'framer-motion'; import { MapPin, Phone, Send } from 'lucide-react'; import { Instagram } from '@/components/InstagramIcon'; import { useState } from 'react'; export default function Contact() { const t = useTranslations('Contact'); const [formData, setFormData] = useState({ name: '', date: '', guests: '', message: '' }); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); const phone = process.env.NEXT_PUBLIC_WHATSAPP_NUMBER || '905000000000'; const text = `*Yeni Rezervasyon Talebi*%0A%0A*Ad Soyad:* ${formData.name}%0A*Tarih:* ${formData.date}%0A*Kişi Sayısı:* ${formData.guests}%0A*Mesaj:* ${formData.message}`; window.open(`https://wa.me/${phone}?text=${text}`, '_blank'); }; const handleChange = (e: React.ChangeEvent) => { setFormData({ ...formData, [e.target.name]: e.target.value }); }; const contactItems = [ { Icon: MapPin, label: 'Adres', value: t('address'), color: 'text-coral', bg: 'bg-coral/10', }, { Icon: Phone, label: 'Telefon / WhatsApp', value: `+${process.env.NEXT_PUBLIC_WHATSAPP_NUMBER || '90 500 000 00 00'}`, color: 'text-aqua', bg: 'bg-aqua/10', }, { Icon: Instagram, label: 'Instagram', value: '@kozmosbeach', href: 'https://www.instagram.com/kozmosbeach/', color: 'text-amber', bg: 'bg-amber/10', }, ]; const inputClass = 'w-full bg-sand border border-sandy rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-coral focus:ring-1 focus:ring-coral transition-all placeholder:text-midnight/30'; return (
— Bize Ulaşın

{t('title')}

{/* Left: info + form */} {/* Contact info */}
{contactItems.map(({ Icon, label, value, href, color, bg }) => (

{label}

{href ? ( {value} ) : (

{value}

)}
))}
{/* Form */}