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.div.attrs(injectE2E).withConfig({
  componentId: "sc-1dvswzg-0"
})(["\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  padding: 0.2rem 0.5rem;\n  box-sizing: border-box;\n  font-family: ", ";\n  font-size: ", ";\n  font-weight: 500;\n  color: ", ";\n  background-color: ", ";\n  cursor: pointer;\n  text-transform: uppercase;\n"], theme('fontPrimary'), fontSize('sm'), function (props) {
  return props.selected === true ? theme('togglerSelectedColor')(props) : theme('togglerColor')(props);
}, function (props) {
  return props.selected === true ? theme('togglerSelectedBackgroundColor')(props) : theme('togglerBackgroundColor')(props);
});

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

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

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