import React, { useState } from 'react'; import { PillIcon, PlusIcon, CheckCircleIcon } from '../icons/Icons'; interface OnboardingModalProps { isOpen: boolean; onComplete: () => void; } const onboardingSteps = [ { icon: PillIcon, title: 'Welcome to Medication Reminder!', description: 'This quick tour will show you how to get the most out of the app.', }, { icon: PlusIcon, title: 'Add Your Medications', description: "Start by clicking the 'Add Medication' button. You can set the name, dosage, frequency, and a custom icon.", }, { icon: CheckCircleIcon, title: 'Track Your Doses', description: "Your daily schedule will appear on the main screen. Simply tap 'Take' to record a dose and stay on track with your health.", }, ]; const OnboardingModal: React.FC = ({ isOpen, onComplete, }) => { const [step, setStep] = useState(0); const currentStep = onboardingSteps[step]; const isLastStep = step === onboardingSteps.length - 1; const handleNext = () => { if (isLastStep) { onComplete(); } else { setStep(s => s + 1); } }; if (!isOpen) return null; return (

{currentStep.title}

{currentStep.description}

{onboardingSteps.map((_, index) => (
))}
); }; export default OnboardingModal;