import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
//  strict
import PropTypes from 'prop-types';
import * as React from 'react';
import styled from 'styled-components';
import injectE2E from '../../Tools/injectE2E';
import { fontSize, theme } from '../../Tools/interpolation';
var Wrapper =
/*#__PURE__*/
styled.a.attrs(injectE2E).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"], theme('fontPrimary'), fontSize('md'), function (props) {
  return props.selected === true ? theme('paginationSelectedColor')(props) : theme('paginationColor')(props);
}, function (props) {
  return props.selected === true ? theme('paginationSelectedBackgroundColor')(props) : theme('paginationBackgroundColor')(props);
}, theme('paginationBorderColor'), theme('paginationHoverColor'), function (props) {
  return props.selected === true ? theme('paginationSelectedBackgroundColor')(props) : theme('paginationHoverBackgroundColor')(props);
});

var PaginationItem = function PaginationItem(_ref) {
  var children = _ref.children,
      rest = _objectWithoutProperties(_ref, ["children"]);

  return React.createElement(Wrapper, rest, children);
};

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