import React, { useState } from "react"; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@/components/ui/dialog"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { Separator } from "@/components/ui/separator"; import { ScrollArea } from "@/components/ui/scroll-area"; import { Info, PlayCircle, Star, CheckCircle, AlertCircle, ChevronRight, Lightbulb, } from "lucide-react"; import { welcomeGuideConfig } from "@/lib/welcomeGuideConfig"; import { WelcomeGuideSection } from "@/types"; import { AgentGraphImpact } from "@/components/features/dashboard/visualizations/AgentGraphImpact"; interface WelcomeGuideModalProps { open: boolean; onOpenChange: (open: boolean) => void; } const iconMap = { Info, PlayCircle, Star, CheckCircle, AlertCircle, }; export function WelcomeGuideModal({ open, onOpenChange, }: WelcomeGuideModalProps) { const [activeSection, setActiveSection] = useState("overview"); const renderSection = (section: WelcomeGuideSection) => { const IconComponent = iconMap[section.icon as keyof typeof iconMap] || Info; // Special rendering for AgentGraph Impact section if (section.id === "agentgraph-impact") { return (
{section.title}

{section.content}

); } // Default rendering for other sections return ( {section.title}

{section.content}

{section.steps && section.steps.length > 0 && (
{section.steps.map((step) => (
{step.number}

{step.title}

{step.description}

{step.tips && step.tips.length > 0 && (
Tips
    {step.tips.map((tip, index) => (
  • {tip}
  • ))}
)}
))}
)}
); }; return ( {welcomeGuideConfig.title} {welcomeGuideConfig.subtitle}
{/* Navigation Sidebar */}
{/* Content Area */}
{welcomeGuideConfig.sections .filter((section) => section.id === activeSection) .map((section) => renderSection(section))}
Navigate through sections using the sidebar or scroll through all content
); }