import React__default from 'react';
import { escapeRegExp, replace } from 'lodash';

function HighLevel({
  keyword,
  name
}) {
  if (!keyword) {
    return /*#__PURE__*/React__default.createElement("span", null, name);
  }
  let reg = new RegExp(escapeRegExp(keyword), 'g');
  let html = replace(name, reg, `<span class="high-level">${keyword}</span>`);
  return /*#__PURE__*/React__default.createElement("span", {
    dangerouslySetInnerHTML: {
      __html: html
    }
  });
}
var HightLevel = /*#__PURE__*/React__default.memo(HighLevel);

export { HightLevel as default };
//# sourceMappingURL=index.js.map
