"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.ViewTitle = void 0;
var _react = _interopRequireDefault(require("react"));
var _infoIcon = require("../info-icon");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/** View Title. Most often uses for titling page sections. For example leaderboard tabs, etc
 * [CAPITALIZATION] Use title case
 */
const ViewTitle = ({
  children,
  customHtmlTag: CustomHtmlTag = 'h2',
  infoText,
  infoIconTestId,
  docsLink,
  description
}) => /*#__PURE__*/(0, _jsxRuntime.jsxs)("header", {
  "test-id": "view-title",
  className: "view-title-wrapper",
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CustomHtmlTag, {
    className: "view-title-custom-tag",
    children: children
  }), infoText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_infoIcon.InfoIcon, {
    docsLink: docsLink,
    testId: infoIconTestId,
    children: infoText
  }), description && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
    className: "description-text",
    "test-id": "view-title-description",
    children: description
  })]
});
exports.ViewTitle = ViewTitle;