"use strict";

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

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

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

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

var NavList = function NavList(props) {
  return _react["default"].createElement("nav", {
    className: "sidenav__section",
    "data-test-section": props.testSection
  }, (props.label || props.rightLabel) && _react["default"].createElement("div", {
    className: "sidenav__section__title muted"
  }, _react["default"].createElement("h5", null, props.label), props.rightLabel && _react["default"].createElement("h6", null, props.rightLabel), props.popover), _react["default"].createElement("ul", {
    className: "nav-list"
  }, props.children));
};

NavList.propTypes = {
  /** Content to render within the list */
  children: _propTypes["default"].node,

  /** Label to use for this section */
  label: _propTypes["default"].string,

  /** Popover to display next to the label */
  popover: _propTypes["default"].bool,

  /** Optional text to display to the right of the label */
  rightLabel: _propTypes["default"].bool,

  /** Value used for testing via data-test-section attribute */
  testSection: _propTypes["default"].bool
};
var _default = NavList;
exports["default"] = _default;