import { t as Highlighter_default } from "./Highlighter.js";
import classNames from "classnames";
import { jsx, jsxs } from "react/jsx-runtime";
import styles from "./components/ElementHeader/styles.module.scss";
const ElementHeaderText = (props) => {
	const { firstText, firstTextEmphasised = false, secondText = void 0, secondTextEmphasised = false, subText = false, className = "", testId, titleHtmlMarkup = "span", highlightText } = props;
	const headerTextWrapperClasses = classNames(className, styles["text-wrapper"], { [styles["text-wrapper--sub-level"]]: subText });
	const firstHeaderTextSegmentClasses = classNames({ [styles["text-wrapper__text--emphasised"]]: firstTextEmphasised });
	const secondHeaderTextSegmentClasses = classNames({ [styles["text-wrapper__text--emphasised"]]: secondTextEmphasised });
	const CustomTag = titleHtmlMarkup;
	return /* @__PURE__ */ jsx("span", {
		"data-testid": testId,
		className: headerTextWrapperClasses,
		children: /* @__PURE__ */ jsx(CustomTag, {
			className: styles["element-header__title"],
			children: /* @__PURE__ */ jsxs(Highlighter_default, {
				searchText: highlightText,
				children: [/* @__PURE__ */ jsx("span", {
					className: firstHeaderTextSegmentClasses,
					children: firstText
				}), secondText && /* @__PURE__ */ jsx("span", {
					className: secondHeaderTextSegmentClasses,
					children: secondText
				})]
			})
		})
	});
};
var ElementHeaderText_default = ElementHeaderText;
var ElementHeaderText_default$1 = ElementHeaderText_default;
export { ElementHeaderText as n, ElementHeaderText_default as r, ElementHeaderText_default$1 as t };

//# sourceMappingURL=ElementHeaderText.js.map