import React, { useEffect, useRef, memo } from 'react';

var TutorialVideo = function TutorialVideo(props) {
  var videoRef = useRef(null);
  useEffect(function () {
    videoRef.current.currentTime = 0;
    videoRef.current.load();

    videoRef.current.onended = function () {
      props.onSkipTutorial();
    };
  }, [props.onSkipTutorial]);
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("video", {
    id: "video",
    className: "tutorial-video",
    ref: videoRef,
    autoPlay: true,
    preload: "metadata",
    src: "https://risecxlibrary.blob.core.windows.net/coach/tutorial.mp4",
    type: "video/mp4"
  }), /*#__PURE__*/React.createElement("button", {
    className: "btn-outline",
    onClick: props.onSkipTutorial
  }, "SKIP TUTORIAL"));
};

export default memo(TutorialVideo);