import React, { useState } from 'react'; import { Motion } from 'lucide-react'; // Main component const WishingWell = () => { const [wish, setWish] = useState(''); const [droppedWishes, setDroppedWishes] = useState([]); const [showCongrats, setShowCongrats] = useState(false); const [isDragging, setIsDragging] = useState(false); const [dragPosition, setDragPosition] = useState({ x: 0, y: 0 }); // Handle wish submission const handleSubmit = (e) => { e.preventDefault(); if (wish.trim()) { setDroppedWishes([...droppedWishes, wish]); setWish(''); setShowCongrats(true); setTimeout(() => setShowCongrats(false), 3000); } }; // Handle drag start const handleDragStart = (e) => { setIsDragging(true); const rect = e.target.getBoundingClientRect(); setDragPosition({ x: e.clientX - rect.left, y: e.clientY - rect.top }); }; // Handle drag end const handleDragEnd = () => { setIsDragging(false); }; return (
{/* Header */}

Make a Wish

{/* Wishing Well SVG */}
{/* Well Base */} {/* Well Rim */} {/* Decorative Elements */} {/* Dropped Wishes Animation */} {droppedWishes.map((droppedWish, index) => (
))}
{/* Wish Input Form */}
setWish(e.target.value)} placeholder="Type your wish..." className="w-full px-4 py-2 rounded-full bg-white/80 backdrop-blur-sm border border-purple-200 focus:outline-none focus:ring-2 focus:ring-purple-300 text-purple-800 placeholder-purple-400" draggable={!!wish} onDragStart={handleDragStart} onDragEnd={handleDragEnd} />
{/* Congratulatory Message */} {showCongrats && (
✨ Your wish has been cast into the well ✨
)} {/* Instructions */}

Type your wish and drag it into the well. Watch as it transforms into stardust and joins the cosmic energy of hopes and dreams.

); }; export default WishingWell;