"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.NavigateButton = NavigateButton;
exports.default = void 0;

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));

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

var _styles = require("@material-ui/core/styles");

var _PlayArrow = _interopRequireDefault(require("@material-ui/icons/PlayArrow"));

var _Button = _interopRequireDefault(require("./Button"));

var useStyles = function useStyles(props) {
  return (0, _styles.makeStyles)(function (theme) {
    return {
      root: {
        paddingLeft: theme.spacing(1),
        paddingRight: theme.spacing(1),
        minWidth: 0
      },
      direction: {
        transform: props.before ? 'scaleX(-1)' : null
      }
    };
  });
};

function NavigateButton(_ref) {
  var children = _ref.children,
      props = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  var classes = useStyles(props)();
  return /*#__PURE__*/_react.default.createElement(_Button.default, Object.assign({}, props, {
    className: classes.root
  }), /*#__PURE__*/_react.default.createElement(_PlayArrow.default, {
    className: classes.direction
  }));
}

var _default = NavigateButton;
exports.default = _default;