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 __());
    };
})();
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import './SearchField.scss';
import MagnifyingGlassSvg from '../Icons/MagnifyingGlassSvg';
var SearchField = /** @class */ (function (_super) {
    __extends(SearchField, _super);
    function SearchField() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.handleInputChange = function (event) {
            var value = event.target.value;
            _this.props.onChange(value);
        };
        return _this;
    }
    SearchField.prototype.render = function () {
        return (React.createElement("div", { className: "search-field " + this.props.className },
            React.createElement(MagnifyingGlassSvg, { className: "search-field__icon" }),
            React.createElement("input", { className: "search-field__input", onChange: this.handleInputChange, placeholder: "Search", value: this.props.value })));
    };
    SearchField.propTypes = {
        className: PropTypes.string,
        onChange: PropTypes.func.isRequired,
        value: PropTypes.string.isRequired,
    };
    SearchField.defaultProps = {
        className: '',
    };
    return SearchField;
}(PureComponent));
export default SearchField;
//# sourceMappingURL=SearchField.js.map