var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React from 'react';
import PropTypes from 'prop-types';
import { getHighlightRegExp, searchStringToRegExp } from '../../utils/regexp';
import { CommonListHighlight } from './common/CommonListHighlight';
// CommonListHighlight
var PureListHighlight = /** @class */ (function (_super) {
    __extends(PureListHighlight, _super);
    function PureListHighlight() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    PureListHighlight.prototype.getTextHighlightPattern = function () {
        var _a = this.props, textHighlightPattern = _a.textHighlightPattern, highlightedText = _a.highlightedText;
        return textHighlightPattern || getHighlightRegExp(highlightedText);
    };
    PureListHighlight.prototype.getTextFilterPattern = function () {
        var _a = this.props, textFilterPattern = _a.textFilterPattern, highlightedText = _a.highlightedText;
        return textFilterPattern || searchStringToRegExp(highlightedText);
    };
    PureListHighlight.prototype.render = function () {
        return (React.createElement(CommonListHighlight, __assign({}, this.props, { textHighlightPattern: this.getTextHighlightPattern(), textFilterPattern: this.getTextFilterPattern() })));
    };
    PureListHighlight.propTypes = __assign({}, CommonListHighlight.propTypes, { highlightedText: PropTypes.string });
    PureListHighlight.defaultProps = __assign({}, CommonListHighlight.defaultProps, { highlightedText: '' });
    PureListHighlight.HIGHLIGHT_TYPE_BACKGROUND = CommonListHighlight.HIGHLIGHT_TYPE_BACKGROUND;
    PureListHighlight.HIGHLIGHT_TYPE_BOLD = CommonListHighlight.HIGHLIGHT_TYPE_BOLD;
    return PureListHighlight;
}(React.Component));
export { PureListHighlight };
//# sourceMappingURL=PureListHighlight.js.map