"use client"; import { useState, useEffect, useCallback } from "react"; import { VIETNAM_MAP_PATH } from "@/components/ui/vietnam-map-path"; export interface Destination { id: string; name: string; vietnameseName: string; region: string; tagline: string; vibe: string; benchmarks: string; x: number; y: number; labelAlign: "left" | "right"; labelDx: number; labelDy: number; } const DESTINATIONS: Destination[] = [ { id: "sapa", name: "Sapa", vietnameseName: "Sa Pa", region: "Northwestern Highlands", tagline: "Misty Valleys & French Chateau Romance", vibe: "Cascading terraced valleys, French Indochine chateaux, and dramatic temperate mountain celebrations.", benchmarks: "Hotel de la Coupole (MGallery), Topas Ecolodge, Silk Path Grand", x: 195, y: 68, labelAlign: "left", labelDx: -14, labelDy: -2, }, { id: "ha-long-bay", name: "Ha Long Bay", vietnameseName: "Vịnh Hạ Long", region: "Northern Seascape", tagline: "Limestone Karsts & Superyacht Buyouts", vibe: "Dramatic UNESCO seascape, emerald waters, and chartered luxury multi-day cruise celebrations.", benchmarks: "Paradise Peak, Heritage Line, Indochina Sails", x: 298, y: 110, labelAlign: "right", labelDx: 14, labelDy: -4, }, { id: "da-nang", name: "Da Nang", vietnameseName: "Đà Nẵng & Hội An", region: "Central Luxury Capital", tagline: "Oceanfront Lawns & Cliffside Sanctuaries", vibe: "Prime international flight connectivity, Michelin dining, and category-defining resort sanctuaries.", benchmarks: "InterContinental Sun Peninsula, Four Seasons The Nam Hai", x: 338, y: 358, labelAlign: "right", labelDx: 14, labelDy: -2, }, { id: "ninh-van-bay", name: "Ninh Van Bay", vietnameseName: "Vịnh Ninh Vân", region: "South Central Sanctuary", tagline: "Ultra-Secluded Peninsula Sanctuaries", vibe: "Accessible only by chartered boat, granite rock formations, and absolute privacy for high-profile buyouts.", benchmarks: "Six Senses Ninh Van Bay, An Lam Retreats", x: 393, y: 518, labelAlign: "right", labelDx: 14, labelDy: -4, }, { id: "nha-trang", name: "Nha Trang", vietnameseName: "Nha Trang & Cam Ranh", region: "South Central Riviera", tagline: "Riviera Glamour & Private Island Retreats", vibe: "Year-round golden sunshine, protected deep-water bays, and pristine white-sand private islands.", benchmarks: "Amanoi (Vinh Hy), Mia Resort, The Anam Cam Ranh", x: 388, y: 546, labelAlign: "right", labelDx: 14, labelDy: 2, }, { id: "dalat", name: "Dalat", vietnameseName: "Đà Lạt", region: "Central Highlands", tagline: "Pine Forests & Heritage French Villas", vibe: "Crisp highland climate, heritage French colonial manors, and romantic pine forest celebrations beside tranquil lakes.", benchmarks: "Ana Mandara Villas Dalat, Dalat Palace Heritage, Sam Tuyen Lam", x: 335, y: 568, labelAlign: "left", labelDx: -14, labelDy: 0, }, { id: "ho-chi-minh-city", name: "Ho Chi Minh City", vietnameseName: "TP. Hồ Chí Minh", region: "Southern Metropolis", tagline: "Heritage Ballrooms & Riverside Grandeur", vibe: "Colonial Indochine architecture meets modern luxury gala ballrooms and world-class culinary talent.", benchmarks: "Park Hyatt Saigon, The Reverie, Mia Saigon", x: 265, y: 618, labelAlign: "left", labelDx: -14, labelDy: 0, }, { id: "phu-quoc-island", name: "Phu Quoc Island", vietnameseName: "Đảo Phú Quốc", region: "Sunset Coastline", tagline: "Sunset Island & Tropical Mega Buyouts", vibe: "30-day visa exemption, direct international widebody access, and iconic golden sunset ceremonies right on the water.", benchmarks: "Regent Phu Quoc, JW Marriott Emerald Bay, InterContinental", x: 134, y: 641, labelAlign: "left", labelDx: -14, labelDy: 4, }, ]; export default function VietnamWeddingMap() { const [activeId, setActiveId] = useState("da-nang"); const [isPaused, setIsPaused] = useState(false); const activeDestination = DESTINATIONS.find((d) => d.id === activeId) || DESTINATIONS[2]; // Auto-cycle through destinations every 4.5 seconds if user is not hovering/interacting useEffect(() => { if (isPaused) return; const interval = setInterval(() => { setActiveId((currentId) => { const currentIndex = DESTINATIONS.findIndex((d) => d.id === currentId); const nextIndex = (currentIndex + 1) % DESTINATIONS.length; return DESTINATIONS[nextIndex].id; }); }, 4500); return () => clearInterval(interval); }, [isPaused]); const handleSelect = useCallback((id: string) => { setActiveId(id); setIsPaused(true); }, []); return (
setIsPaused(true)} onMouseLeave={() => setIsPaused(false)} > {/* Background Cartography Accents */}
{/* Main Map SVG Presentation (Clean Minimalist Flat Cartography) */}
{/* Elegant land gradient */} {/* Cartographic Grid Lines (Meridians & Parallels) */} {/* Geographic Sea Labels */} GULF OF TONKIN EAST SEA GULF OF THAILAND {/* Coordinates watermark */} 108°14'E · 16°04'N {/* Compass Rose */} N {/* Paracel Islands (Hoàng Sa) cartographic representation */} Hoàng Sa (VN) {/* Spratly Islands (Trường Sa) cartographic representation */} Trường Sa (VN) {/* Vietnam Mainland & Islands SVG Path (Clean Flat Luxury Render) */} {/* 8 Destination Hotspots */} {DESTINATIONS.map((dest) => { const isActive = dest.id === activeId; const isRight = dest.labelAlign === "right"; const labelWidth = Math.round(dest.name.length * 6.2 + 14); return ( handleSelect(dest.id)} transform={`translate(${dest.x}, ${dest.y})`} > {/* Active static gold halo ring (No moving radar ping) */} {isActive && ( )} {/* Base Outer Ring */} {/* Center Core Dot */} {/* Destination Text Label */} {/* Dynamic label background chip hugging name length */} {dest.name} ); })}
{/* Dynamic Destination Spotlight Card (Clean editorial design without redundant buttons) */}
{activeDestination.region}

{activeDestination.name} ({activeDestination.vietnameseName})

{/* Stepper Dots Indicator (8 destinations) */}
{DESTINATIONS.map((d) => (

{activeDestination.vibe}

Benchmark Venues: {activeDestination.benchmarks}
); }