"use strict";

exports.__esModule = true;
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

require("./style.css");

var _reactLottie = _interopRequireDefault(require("react-lottie"));

var _coord = _interopRequireDefault(require("./coord.json"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var defaultOptions = {
  loop: true,
  autoplay: true,
  animationData: _coord["default"]
};

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["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
    className: "calibration"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "body-parts-alert"
  }, /*#__PURE__*/_react["default"].createElement("span", {
    className: "alert-text"
  }, /*#__PURE__*/_react["default"].createElement("h1", null, " ", messageSelector()), /*#__PURE__*/_react["default"].createElement(_reactLottie["default"], {
    className: "mcalibration",
    options: defaultOptions,
    direction: 1,
    isStopped: false
  })))));
}

var _default = Calibration;
exports["default"] = _default;
module.exports = exports.default;