"use strict";

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

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

var _reactRedux = require("react-redux");

var _main = require("../../store/rehab/main");

require("./style.css");

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

var ResultRecordScreen = function ResultRecordScreen(props) {
  var _useSelector = (0, _reactRedux.useSelector)(function (state) {
    return state.rehab.main;
  }),
      completed = _useSelector.completed;

  var dispatch = (0, _reactRedux.useDispatch)();

  var handleReturnAdmin = function handleReturnAdmin(e) {
    dispatch((0, _main.shouldRedirectTo)());
  };

  var handleRecordNew = function handleRecordNew(e) {
    dispatch((0, _main.initSequence)());
  };

  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "result-record"
  }, /*#__PURE__*/_react["default"].createElement("div", {
    className: "container"
  }, /*#__PURE__*/_react["default"].createElement("h2", {
    className: "splash-subtitle"
  }, "What would you like to do?"), /*#__PURE__*/_react["default"].createElement("div", {
    className: "splash-actions"
  }, /*#__PURE__*/_react["default"].createElement("button", {
    className: "btn-outline",
    onClick: handleReturnAdmin
  }, "Return to Admin Console"), /*#__PURE__*/_react["default"].createElement("button", {
    className: "btn-outline",
    onClick: handleRecordNew
  }, "Record Another Exercise"))));
};

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