import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/esm/inherits";
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Swipe from './react-swipe';

/* eslint no-console: 0*/
var MyComponent = /*#__PURE__*/function (_Component) {
  function MyComponent() {
    _classCallCheck(this, MyComponent);
    return _callSuper(this, MyComponent, arguments);
  }
  _inherits(MyComponent, _Component);
  return _createClass(MyComponent, [{
    key: "onSwipeStart",
    value: function onSwipeStart(event) {
      console.log('Start swiping...', event);
    }
  }, {
    key: "onSwipeMove",
    value: function onSwipeMove(position, event) {
      console.log("Moved ".concat(position.x, " pixels horizontally"), event);
      console.log("Moved ".concat(position.y, " pixels vertically"), event);
    }
  }, {
    key: "onSwipeEnd",
    value: function onSwipeEnd(event) {
      console.log('End swiping...', event);
    }
  }, {
    key: "render",
    value: function render() {
      var boxStyle = {
        width: '100%',
        margin: '20px auto',
        height: '300px',
        border: '1px solid black',
        background: '#ccc',
        padding: '20px',
        fontSize: '3em'
      };
      return /*#__PURE__*/React.createElement(Swipe, {
        onSwipeStart: this.onSwipeStart,
        onSwipeMove: this.onSwipeMove,
        onSwipeEnd: this.onSwipeEnd
      }, /*#__PURE__*/React.createElement("div", {
        style: boxStyle
      }, "Open the console and swipe me"));
    }
  }]);
}(Component);
ReactDOM.render(/*#__PURE__*/React.createElement(MyComponent, null), document.getElementById('root'));