import React, { useState, useEffect, useRef } from 'react';
import { createRoot } from 'react-dom/client';
import {
Calendar,
MapPin,
Heart,
MessageCircle,
Copy,
Check,
Music,
Music2,
Clock,
ChevronDown
} from 'lucide-react';
// --- Components ---
const Countdown = ({ targetDate }: { targetDate: Date }) => {
const [timeLeft, setTimeLeft] = useState({ days: 0, hours: 0, minutes: 0, seconds: 0 });
useEffect(() => {
const timer = setInterval(() => {
const now = new Date().getTime();
const difference = targetDate.getTime() - now;
if (difference > 0) {
setTimeLeft({
days: Math.floor(difference / (1000 * 60 * 60 * 24)),
hours: Math.floor((difference / (1000 * 60 * 60)) % 24),
minutes: Math.floor((difference / 1000 / 60) % 60),
seconds: Math.floor((difference / 1000) % 60)
});
}
}, 1000);
return () => clearInterval(timer);
}, [targetDate]);
return (
{[
{ label: 'Hari', value: timeLeft.days },
{ label: 'Jam', value: timeLeft.hours },
{ label: 'Menit', value: timeLeft.minutes },
{ label: 'Detik', value: timeLeft.seconds }
].map((item, idx) => (
{item.value}
{item.label}
))}
);
};
const App = () => {
const [isOpen, setIsOpen] = useState(false);
const [isPlaying, setIsPlaying] = useState(false);
const [copied, setCopied] = useState(null);
const audioRef = useRef(null);
const targetDate = new Date('2025-12-29T09:00:00');
const toggleMusic = () => {
if (audioRef.current) {
if (isPlaying) audioRef.current.pause();
else audioRef.current.play();
setIsPlaying(!isPlaying);
}
};
const handleCopy = (text: string) => {
navigator.clipboard.writeText(text);
setCopied(text);
setTimeout(() => setCopied(null), 2000);
};
const handleOpen = () => {
setIsOpen(true);
setIsPlaying(true);
if (audioRef.current) audioRef.current.play();
};
if (!isOpen) {
return (
Undangan Pernikahan
Ahmad & Anisah
);
}
return (
{/* Floating Music Toggle */}
{/* Hero Section */}
The Wedding Of
Ahmad & Anisah
29 . 12 . 2025
{/* Verse Section */}
"Membangun keluarga adalah ibadah terpanjang. Kami memulainya dengan Bismillah, melangkah dengan keyakinan, dan menyatu dalam doa."
{/* Couple Section - Optimized for 3x4 photos */}
{/* Groom */}
{/* Photo 3x4 Placeholder */}
Ahmad Askhabul Yamin
Putra dari
Bpk Moh. Hasan & Ibu Sofiah
{/* Bride */}
{/* Photo 3x4 Placeholder */}
Anisah Permata Sari
Putri dari
Bpk Siman & Ibu Titin
{/* Event Details */}
Acara Pernikahan
Akad Nikah
SENIN, 29 DESEMBER 2025
09.00 WIB - Selesai
Wonogiri, Jawa Tengah
"Kami mengundang kehadiran Bapak/Ibu/Saudara/i untuk menyaksikan momen suci penyatuan cinta kami."
Buka Lokasi Maps
{/* Wedding Gift */}
Kado Digital
Doa restu Anda adalah hadiah terindah. Namun jika ingin memberikan tanda kasih secara digital, dapat melalui:
{/* Account 1 */}
BCA - AHMAD ASKHABUL YAMIN
3452812212
{/* Account 2 */}
BCA - ANISAH PERMATA SARI
108286626
{/* RSVP */}
{/* Footer */}
);
};
const root = createRoot(document.getElementById('root')!);
root.render();