'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');

var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _reactRouterDom = require('react-router-dom');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

/**
 * Prevents the `newTab` or `appearFocused` prop from being passed to Link,
 * which emits errors when it receives props it doesn't expect.
 */
var DomSafeLink = function DomSafeLink(_ref) {
  var newTab = _ref.newTab,
      appearFocused = _ref.appearFocused,
      children = _ref.children,
      rest = (0, _objectWithoutProperties3.default)(_ref, ['newTab', 'appearFocused', 'children']);
  return _react2.default.createElement(
    _reactRouterDom.Link,
    rest,
    children
  );
};

exports.default = DomSafeLink;