"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.SubNavigationItemLink = void 0;
var _react = _interopRequireDefault(require("react"));
var _subNavigationItemContent = require("./sub-navigation-item-content");
var _tooltip = require("../tooltip");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const SubNavigationItemLink = ({
  item,
  className,
  onSelect,
  role
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.Tooltip, {
  content: item.toolTip,
  placement: _tooltip.TOOLTIP_PLACEMENT_TYPES.BOTTOM,
  docsLink: item.docsLink,
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("a", {
    className: className,
    onClick: () => onSelect(item),
    rel: "noopener noreferrer",
    "test-id": item.testId,
    href: item.link,
    role: role,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
      className: "button-content",
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_subNavigationItemContent.SubNavigationItemContent, {
        label: item.label,
        leftElement: item.leftElement,
        rightElement: item.rightElement
      })
    })
  })
});
exports.SubNavigationItemLink = SubNavigationItemLink;