"use strict";

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

var _styledBase = require("@emotion/styled-base");

var _styledBase2 = _interopRequireDefault(_styledBase);

var _react = require("react");

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(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 = exports.SkeletonStyledComponent = (
/*#__PURE__*/
0, _styledBase2["default"])("li", {
  target: "ehlq8l30",
  label: "SkeletonStyledComponent"
})(process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL1RhYnMvVGFiLlNrZWxldG9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUttRCIsImZpbGUiOiIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9UYWJzL1RhYi5Ta2VsZXRvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBSZWFjdCBmcm9tIFwicmVhY3RcIlxuaW1wb3J0IFByb3BUeXBlcyBmcm9tIFwicHJvcC10eXBlc1wiXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIlxuaW1wb3J0IHsgTGluayB9IGZyb20gXCJnYXRzYnlcIlxuXG5leHBvcnQgY29uc3QgU2tlbGV0b25TdHlsZWRDb21wb25lbnQgPSBzdHlsZWQoYGxpYClgYFxuXG5leHBvcnQgY29uc3QgdGFiUHJvcFR5cGVzID0ge1xuICB0bzogUHJvcFR5cGVzLnN0cmluZyxcbiAgY2xhc3NOYW1lOiBQcm9wVHlwZXMuc3RyaW5nLFxuICBvbkNsaWNrOiBQcm9wVHlwZXMuZnVuYyxcbn1cblxuY29uc3QgdGFiU2tlbGV0b25Qcm9wVHlwZXMgPSB7XG4gIC4uLnRhYlByb3BUeXBlcyxcbiAgU3R5bGVkQ29tcG9uZW50OiBQcm9wVHlwZXMuYW55LFxufVxuXG5jb25zdCB0YWJTa2VsZXRvbkRlZmF1bHRQcm9wVHlwZXMgPSB7XG4gIFN0eWxlZENvbXBvbmVudDogU2tlbGV0b25TdHlsZWRDb21wb25lbnQsXG59XG5cbmNvbnN0IFRhYlNrZWxldG9uID0gKHtcbiAgU3R5bGVkQ29tcG9uZW50LFxuICBjbGFzc05hbWUsXG4gIHRvLFxuICBvbkNsaWNrLFxuICBjaGlsZHJlbixcbiAgLi4ucmVzdFxufSkgPT4gKFxuICA8U3R5bGVkQ29tcG9uZW50IGNsYXNzTmFtZT17Y2xhc3NOYW1lfSB7Li4ucmVzdH0+XG4gICAge3RvID8gKFxuICAgICAgPExpbmsgdG89e3RvfSBvbkNsaWNrPXtvbkNsaWNrfT5cbiAgICAgICAge2NoaWxkcmVufVxuICAgICAgPC9MaW5rPlxuICAgICkgOiAoXG4gICAgICBjaGlsZHJlblxuICAgICl9XG4gIDwvU3R5bGVkQ29tcG9uZW50PlxuKVxuXG5UYWJTa2VsZXRvbi5wcm9wVHlwZXMgPSB0YWJTa2VsZXRvblByb3BUeXBlc1xuVGFiU2tlbGV0b24uZGVmYXVsdFByb3BzID0gdGFiU2tlbGV0b25EZWZhdWx0UHJvcFR5cGVzXG5cbmV4cG9ydCBkZWZhdWx0IFRhYlNrZWxldG9uXG4iXX0= */");
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;