"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.tabPropTypes = exports.SkeletonStyledComponent = undefined;

var _react = require("react");

var _react2 = _interopRequireDefault(_react);

var _propTypes = require("prop-types");

var _propTypes2 = _interopRequireDefault(_propTypes);

var _reactEmotion = require("react-emotion");

var _reactEmotion2 = _interopRequireDefault(_reactEmotion);

var _gatsby = require("gatsby");

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

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var SkeletonStyledComponent =
/*#__PURE__*/
exports.SkeletonStyledComponent = (0, _reactEmotion2["default"])("li", {
  target: "ehlq8l30"
})();
var tabPropTypes = exports.tabPropTypes = {
  to: _propTypes2["default"].string,
  className: _propTypes2["default"].string,
  onClick: _propTypes2["default"].func
};

var tabSkeletonPropTypes = _objectSpread({}, tabPropTypes, {
  StyledComponent: _propTypes2["default"].any
});

var tabSkeletonDefaultPropTypes = {
  StyledComponent: SkeletonStyledComponent
};

var TabSkeleton = function TabSkeleton(_ref) {
  var StyledComponent = _ref.StyledComponent,
      className = _ref.className,
      to = _ref.to,
      onClick = _ref.onClick,
      children = _ref.children,
      rest = _objectWithoutProperties(_ref, ["StyledComponent", "className", "to", "onClick", "children"]);

  return _react2["default"].createElement(StyledComponent, Object.assign({
    className: className
  }, rest), to ? _react2["default"].createElement(_gatsby.Link, {
    to: to,
    onClick: onClick
  }, children) : children);
};

TabSkeleton.propTypes = tabSkeletonPropTypes;
TabSkeleton.defaultProps = tabSkeletonDefaultPropTypes;
exports["default"] = TabSkeleton;