"use strict";

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

var _react = _interopRequireDefault(require("react"));

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

var _classnames = _interopRequireDefault(require("classnames"));

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

var NavItem = function NavItem(props) {
  return _react["default"].createElement("li", {
    className: (0, _classnames["default"])({
      'nav-list__link': true,
      'is-active': props.isActive
    }),
    "data-test-section": props.testSection
  }, _react["default"].createElement("div", {
    className: "flex flex-justified--between flex-align--center flex--1 height--1-1"
  }, props.leftContent, props.rightContent && _react["default"].createElement("div", {
    className: "soft--right"
  }, props.rightContent)));
};

NavItem.propTypes = {
  /** Whether or not this item is currently selected */
  isActive: _propTypes["default"].bool,

  /**
   * Content to render within the NavItem
   * Will be left aligned
   */
  leftContent: _propTypes["default"].node.isRequired,

  /**
   * Content to render within the NavItem
   * Will be right aligned
   */
  rightContent: _propTypes["default"].node,

  /** String to use for testing */
  testSection: _propTypes["default"].string
};
var _default = NavItem;
exports["default"] = _default;