import React from 'react';
import "./style.css";
import Lottie from 'react-lottie';
import animationData from "./coord.json";
var defaultOptions = {
  loop: true,
  autoplay: true,
  animationData: animationData
};

function Calibration(_ref) {
  var currentExercise = _ref.currentExercise,
      incorrectSide = _ref.incorrectSide;
  var message1 = 'Pose Undetected. Move backward...';
  var message2 = 'Pose Undetected. Move back so your ankles are visible to the camera.';
  var message3 = 'Wrong side detected. Face the opposite direction.';

  var messageSelector = function messageSelector() {
    if ((currentExercise === null || currentExercise === void 0 ? void 0 : currentExercise.label) === 'Squat') return message2;
    if (incorrectSide) return message3;
    return message1;
  };

  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
    className: "calibration"
  }, /*#__PURE__*/React.createElement("div", {
    className: "body-parts-alert"
  }, /*#__PURE__*/React.createElement("span", {
    className: "alert-text"
  }, /*#__PURE__*/React.createElement("h1", null, " ", messageSelector()), /*#__PURE__*/React.createElement(Lottie, {
    className: "mcalibration",
    options: defaultOptions,
    direction: 1,
    isStopped: false
  })))));
}

export default Calibration;