import { html, nothing } from "lit";
import { unsafeHTML } from "lit/directives/unsafe-html.js";
import { renderWithHighlights } from "./render-highlights.js";
const renderItemTextHighlighted = ({ props })=>{
    const { textValue, highlightKeywords, highlightString, onError = (error)=>console.error(error) } = props;
    try {
        const highlightedValue = renderWithHighlights(textValue, highlightKeywords, highlightString);
        return html`${unsafeHTML(highlightedValue)}`;
    } catch (error) {
        onError(error);
        return nothing;
    }
};
export { renderItemTextHighlighted };
