import React, { memo } from 'react';
import exerciseProgress from '../../assets/exercise-progress.svg';
import './SingleResult.css';
import Timer from './Timer';

var SingleResult = function SingleResult(props) {
  var _props$exercise, _props$exercise$label, _props$resultsExercis;

  return /*#__PURE__*/React.createElement("div", {
    className: "single-result"
  }, /*#__PURE__*/React.createElement("div", {
    className: "single-result-container"
  }, /*#__PURE__*/React.createElement("h2", {
    className: "result-subtitle"
  }, (_props$exercise = props.exercise) === null || _props$exercise === void 0 ? void 0 : (_props$exercise$label = _props$exercise.label) === null || _props$exercise$label === void 0 ? void 0 : _props$exercise$label.toUpperCase()), /*#__PURE__*/React.createElement("h1", {
    className: "result-title"
  }, "COMPLETED"), /*#__PURE__*/React.createElement("h2", {
    className: "result-number"
  }, (_props$resultsExercis = props.resultsExercises.find(function (exer) {
    return exer._id === props.exercise._id;
  })) === null || _props$resultsExercis === void 0 ? void 0 : _props$resultsExercis.result)), /*#__PURE__*/React.createElement(Timer, {
    isPaused: props.isPaused,
    onTimerCountDownFinish: props.onNextTransition
  }));
};

export default memo(SingleResult);