import React, { useState } from 'react' import { makeStyles } from '@material-ui/core' import { Button } from 'src/components/buttons' import { ReactComponent as CompleteIcon } from 'src/styling/icons/stage/spring/complete.svg' import { ReactComponent as CurrentIcon } from 'src/styling/icons/stage/spring/current.svg' import { ReactComponent as EmptyIcon } from 'src/styling/icons/stage/spring/empty.svg' import { mainStyles } from './Wizard.styles' const useStyles = makeStyles(mainStyles) const Wizard = ({ header, nextStepText, finalStepText, finish, children }) => { const [currentStepIndex, setCurrentStepIndex] = useState(0) const classes = useStyles() const handleMoveToNextStep = nextStepIndex => { const finalStepIndex = children.length - 1 if (nextStepIndex > finalStepIndex) { finish() } else { setCurrentStepIndex(nextStepIndex) } } const currentStep = children[currentStepIndex] const finalStepIndex = children.length - 1 const isFinalStep = currentStepIndex === finalStepIndex return ( <>