import React, { useState, useEffect } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { X, Hand, Move, Palette, Sparkles, CheckCircle2 } from 'lucide-react';
export function UserGuideModal() {
const [isOpen, setIsOpen] = useState(false);
const [step, setStep] = useState(0);
useEffect(() => {
const hasSeenGuide = localStorage.getItem('neural_ai_has_seen_guide');
if (!hasSeenGuide) {
// Delay showing it slightly so the page loads first
const timer = setTimeout(() => setIsOpen(true), 1000);
return () => clearTimeout(timer);
}
}, []);
const handleClose = () => {
setIsOpen(false);
localStorage.setItem('neural_ai_has_seen_guide', 'true');
};
const nextStep = () => {
if (step < steps.length - 1) {
setStep(step + 1);
} else {
handleClose();
}
};
const steps = [
{
title: "Welcome to Neural AI! 🚀",
description: "Let's take a quick tour of how to build your perfect website in minutes.",
icon:
},
{
title: "Adding Components 🧱",
description: "Open the Components tab to add sections, containers, text, and buttons directly to your canvas.",
icon:
},
{
title: "Moving Things Around ↕️",
description: "Tap any component on your canvas to open its action menu. Use the Up and Down arrows to instantly reposition it without dragging!",
icon:
},
{
title: "Customizing Properties 🎨",
description: "With a component selected, open the Properties panel to change its colors, spacing, borders, and text content.",
icon:
},
{
title: "You're all set! 🎉",
description: "Tap the AI Optimize button at the top if you ever need AI to polish your layout automatically.",
icon:
}
];
return (
{isOpen && (
<>
{steps[step].icon}