"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

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

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

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

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

var React = _interopRequireWildcard(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _injectE2E = _interopRequireDefault(require("../../Tools/injectE2E"));

var _interpolation = require("../../Tools/interpolation");

var Wrapper =
/*#__PURE__*/
_styledComponents.default.a.attrs(_injectE2E.default).withConfig({
  componentId: "hyz9b3-0"
})(["\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  padding: 5px 8px;\n  font-family: ", ";\n  font-size: ", ";\n  font-weight: 500;\n  color: ", ";\n  background-color: ", ";\n  border: 1px solid ", ";\n  border-radius: 5px;\n  margin-right: 5px;\n  cursor: pointer;\n\n  &:hover {\n    color: ", ";\n    background-color: ", ";\n  }\n"], (0, _interpolation.theme)('fontPrimary'), (0, _interpolation.fontSize)('md'), function (props) {
  return props.selected === true ? (0, _interpolation.theme)('paginationSelectedColor')(props) : (0, _interpolation.theme)('paginationColor')(props);
}, function (props) {
  return props.selected === true ? (0, _interpolation.theme)('paginationSelectedBackgroundColor')(props) : (0, _interpolation.theme)('paginationBackgroundColor')(props);
}, (0, _interpolation.theme)('paginationBorderColor'), (0, _interpolation.theme)('paginationHoverColor'), function (props) {
  return props.selected === true ? (0, _interpolation.theme)('paginationSelectedBackgroundColor')(props) : (0, _interpolation.theme)('paginationHoverBackgroundColor')(props);
});

var PaginationItem = function PaginationItem(_ref) {
  var children = _ref.children,
      rest = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  return React.createElement(Wrapper, rest, children);
};

PaginationItem.propTypes = process.env.NODE_ENV !== "production" ? {
  children: _propTypes.default.node,
  e2e: _propTypes.default.string.isRequired,
  selected: _propTypes.default.bool
} : {};
PaginationItem.defaultProps = {
  e2e: 'defaultPaginationItem',
  selected: false
};
var _default = PaginationItem;
exports.default = _default;