import * as React from 'react';
import { STEP_TYPES } from './consts';
import { useTour } from './hooks/useTour';
import { HighlightStep } from './steps/HighlightStep';
import { ModalStep } from './steps/ModalStep';
import { SpotlightStep } from './steps/SpotlightStep';
export const TourRenderer: React.FC = () => {
const {
isActive,
currentStep,
currentStepIndex,
totalSteps,
isFirstStep,
isLastStep,
next,
prev,
skip,
done,
} = useTour();
if (!isActive || !currentStep) {
return null;
}
const commonProps = {
currentStep: currentStepIndex,
totalSteps,
isFirstStep,
isLastStep,
onNext: next,
onPrev: prev,
onSkip: skip,
onDone: done,
};
switch (currentStep.type) {
case STEP_TYPES.MODAL:
return (
);
case STEP_TYPES.SPOTLIGHT:
return (
);
case STEP_TYPES.HIGHLIGHT:
return (
);
default:
return null;
}
};