import React, { useState } from 'react';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from './ui/dialog';
import { Button } from './ui/button';

const steps = [
  {
    title: 'Welcome to AeThex Studio',
    description: 'Your cross-platform game IDE. Let’s get started!',
  },
  {
    title: 'Code Editor',
    description: 'Write Roblox Lua and Verse code with Monaco editor.',
  },
  {
    title: 'AI Assistant',
    description: 'Get instant code help and explanations.',
  },
  {
    title: 'Curriculum',
    description: 'Learn game development with interactive lessons.',
  },
  {
    title: 'Projects & Assets',
    description: 'Manage files, templates, and cross-platform assets.',
  },
];

export function OnboardingDialog({ open, onClose }: { open: boolean; onClose: () => void }) {
  const [step, setStep] = useState(0);
  return (
    <Dialog open={open} onOpenChange={onClose}>
      <DialogContent>
        <DialogHeader>
          <DialogTitle>{steps[step].title}</DialogTitle>
          <DialogDescription>{steps[step].description}</DialogDescription>
        </DialogHeader>
        <div className="flex justify-between mt-6">
          <Button disabled={step === 0} onClick={() => setStep(step - 1)}>Back</Button>
          {step < steps.length - 1 ? (
            <Button onClick={() => setStep(step + 1)}>Next</Button>
          ) : (
            <Button onClick={onClose}>Finish</Button>
          )}
        </div>
      </DialogContent>
    </Dialog>
  );
}
