"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
require("core-js/modules/web.dom-collections.iterator.js");
var _react = require("react");
var _stylesModule = _interopRequireDefault(require("./styles.module.css"));
var _Phase = require("./Phase0");
var _Phase2 = require("./Phase1");
var _Phase3 = require("./Phase2");
var _Phase4 = require("./Phase3");
var _Phase5 = require("./Phase4");
var _Phase6 = require("./Phase5");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const OverlayingTutorial = () => {
  const [phase, setPhase] = (0, _react.useState)(0);
  const [isFinished, setIsFinished] = (0, _react.useState)(false);
  const onFinished = () => {
    setIsFinished(true);
  };
  if (isFinished) {
    return null;
  }
  const onOverlayClick = e => {
    e.stopPropagation();
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: _stylesModule.default.overlay,
    onClick: onOverlayClick,
    children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
      className: _stylesModule.default.tutorialBody,
      children: [phase === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase.Phase0, {
        nextPhase: () => setPhase(1)
      }) : null, phase === 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase2.Phase1, {
        nextPhase: () => setPhase(2)
      }) : null, phase === 2 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase3.Phase2, {
        nextPhase: () => setPhase(3)
      }) : null, phase === 3 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase4.Phase3, {
        nextPhase: () => setPhase(4)
      }) : null, phase === 4 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase5.Phase4, {
        nextPhase: () => setPhase(5)
      }) : null, phase === 5 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Phase6.Phase5, {
        nextPhase: onFinished
      }) : null]
    })
  });
};
var _default = exports.default = OverlayingTutorial;