import React from 'react';
import { SubNavigationItemContent } from './sub-navigation-item-content';
import { Tooltip, TOOLTIP_PLACEMENT_TYPES } from '../tooltip';
import { jsx as _jsx } from "react/jsx-runtime";
export const SubNavigationItemLink = ({
  item,
  className,
  onSelect,
  role
}) => /*#__PURE__*/_jsx(Tooltip, {
  content: item.toolTip,
  placement: TOOLTIP_PLACEMENT_TYPES.BOTTOM,
  docsLink: item.docsLink,
  children: /*#__PURE__*/_jsx("a", {
    className: className,
    onClick: () => onSelect(item),
    rel: "noopener noreferrer",
    "test-id": item.testId,
    href: item.link,
    role: role,
    children: /*#__PURE__*/_jsx("span", {
      className: "button-content",
      children: /*#__PURE__*/_jsx(SubNavigationItemContent, {
        label: item.label,
        leftElement: item.leftElement,
        rightElement: item.rightElement
      })
    })
  })
});