'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

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

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

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

  return _react2.default.createElement(
    _reactRouterDom.Link,
    rest,
    children
  );
};