'use client'; import { useState } from 'react'; import { Box, Stepper, Step, StepLabel, Button, Typography, Paper, TextField, Avatar, IconButton, Alert, } from '@mui/material'; import { ArrowBack, ArrowForward, Check } from '@mui/icons-material'; import { motion, AnimatePresence } from 'framer-motion'; import { useRouter } from 'next/navigation'; const steps = ['Welcome', 'Add Child', 'Invite Family', 'Notifications']; export default function OnboardingPage() { const [activeStep, setActiveStep] = useState(0); const [childName, setChildName] = useState(''); const [childBirthDate, setChildBirthDate] = useState(''); const router = useRouter(); const handleNext = () => { if (activeStep === steps.length - 1) { // Complete onboarding router.push('/'); } else { setActiveStep((prevActiveStep) => prevActiveStep + 1); } }; const handleBack = () => { setActiveStep((prevActiveStep) => prevActiveStep - 1); }; const handleSkip = () => { router.push('/'); }; return ( {steps.map((label) => ( {label} ))} {activeStep === 0 && ( Welcome to Maternal! 🎉 We're excited to help you track and understand your child's development, sleep patterns, feeding schedules, and more. 📊 Track Activities 🤖 AI Insights 👨‍👩‍👧 Family Sharing )} {activeStep === 1 && ( Add Your First Child Let's start by adding some basic information about your child. setChildName(e.target.value)} margin="normal" InputProps={{ sx: { borderRadius: 3 }, }} /> setChildBirthDate(e.target.value)} margin="normal" InputLabelProps={{ shrink: true, }} InputProps={{ sx: { borderRadius: 3 }, }} /> You can add more children and details later from settings. )} {activeStep === 2 && ( Invite Family Members Share your child's progress with family members. They can view activities and add their own entries. You can skip this step and invite family members later. )} {activeStep === 3 && ( You're All Set! 🎉 Start tracking your child's activities and get personalized insights. Next Steps: • Track your first feeding, sleep, or diaper change
• Chat with our AI assistant for parenting tips
• Explore insights and predictions based on your data
)}
{activeStep < steps.length - 1 && activeStep > 0 && ( )}
); }