"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.div.attrs(_injectE2E.default).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"], (0, _interpolation.theme)('fontPrimary'), (0, _interpolation.fontSize)('sm'), function (props) {
  return props.selected === true ? (0, _interpolation.theme)('togglerSelectedColor')(props) : (0, _interpolation.theme)('togglerColor')(props);
}, function (props) {
  return props.selected === true ? (0, _interpolation.theme)('togglerSelectedBackgroundColor')(props) : (0, _interpolation.theme)('togglerBackgroundColor')(props);
});

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

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