'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _propTypes2 = _interopRequireDefault(_propTypes);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }

var BaseTabMenuItem = _styledComponents2.default.span.withConfig({
  displayName: 'TabMenuItem__BaseTabMenuItem'
})(['padding:10px;text-decoration:', ';text-transform:uppercase;font-family:\'Montserrat\',sans-serif;font-weight:500;font-size:16px;text-align:center;color:', ';cursor:pointer;&.active{text-decoration:underline;color:', ';}@media (max-width:480px){font-size:13px;}'], function (props) {
  return props.selected ? 'underline' : 'none';
}, function (props) {
  return props.selected ? props.theme['gray-5'] : props.theme['gray-3'];
}, function (props) {
  return props.theme['gray-5'];
});

var TabMenuItem = function TabMenuItem(props) {
  var children = props.children,
      selected = props.selected,
      rest = _objectWithoutProperties(props, ['children', 'selected']);

  return _react2.default.createElement(
    BaseTabMenuItem,
    _extends({ selected: selected }, rest),
    children
  );
};

TabMenuItem.propTypes = {
  selected: _propTypes2.default.bool
};

exports.default = TabMenuItem;