"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),r=require("react/jsx-runtime"),t=require("../../styles/ScopeTree.module.css.js");exports.HighlightedText=function(i){var s=i.text,n=i.highlight;if(!n||!n.trim())return r.jsx(r.Fragment,{children:s});var a=new RegExp("(".concat(n,")"),"gi"),l=s.split(a);return r.jsx(r.Fragment,{children:l.map(function(i,s){return a.test(i)?r.jsx("span",e.__assign({className:t.default.highlightText},{children:i}),s):r.jsx("span",{children:i},s)})})};
//# sourceMappingURL=HighlightedText.js.map
