import { T } from 'Components' import Controls from 'Components/Controls' import Conversation, { ConversationProps } from 'Components/conversation/Conversation' import SeeAnswersButton from 'Components/conversation/SeeAnswersButton' import PageFeedback from 'Components/Feedback/PageFeedback' import SearchButton from 'Components/SearchButton' import TargetSelection from 'Components/TargetSelection' import React from 'react' import { useSelector } from 'react-redux' import { firstStepCompletedSelector } from 'Selectors/analyseSelectors' import { simulationProgressSelector } from 'Selectors/progressSelectors' import * as Animate from 'Ui/animate' import Progress from 'Ui/Progress' type SimulationProps = { explanations: React.ReactNode customEndMessages?: ConversationProps['customEndMessages'] } export default function Simulation({ explanations, customEndMessages }: SimulationProps) { const firstStepCompleted = useSelector(firstStepCompletedSelector) const progress = useSelector(simulationProgressSelector) return ( <> {firstStepCompleted && ( <> {progress < 1 ? ( Affinez la simulation en répondant aux questions : ) : ( )} {progress < 1 && ( )} Êtes-vous satisfait de ce simulateur ? } customEventName="rate simulator" />{' '} {explanations} > )} > ) }