/**
 * @fileoverview added by tsickle
 * Generated from: lib/form/search-input/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 组件类
import { Component, EventEmitter, Input, Output } from "@angular/core";
import { debounce } from "lodash";
import { getTranslation } from "../../utils/utils";
var SearchInputComponent = /** @class */ (function () {
    function SearchInputComponent() {
        this.placeholder = "";
        this.hanleSearch = new EventEmitter();
        this.handleInput = new EventEmitter();
        this.searchValue = "";
    }
    /**
     * @return {?}
     */
    SearchInputComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.getInfo();
        this.debouncedInput = debounce((/**
         * @return {?}
         */
        function () {
            _this.onSeach();
        }), 300);
    };
    /**
     * @return {?}
     */
    SearchInputComponent.prototype.getInfo = /**
     * @return {?}
     */
    function () {
        this.translation = getTranslation();
        this.placeholder = this.placeholder || this.translation.SEARCH;
    };
    /**
     * @param {?} e
     * @return {?}
     */
    SearchInputComponent.prototype.onInput = /**
     * @param {?} e
     * @return {?}
     */
    function (e) {
        this.handleInput.emit(e.value);
        this.debouncedInput();
    };
    /**
     * @return {?}
     */
    SearchInputComponent.prototype.onSeach = /**
     * @return {?}
     */
    function () {
        this.hanleSearch.emit(this.searchValue);
    };
    SearchInputComponent.decorators = [
        { type: Component, args: [{
                    selector: "rs-search-input",
                    template: "<div class=\"rs-search-input\">\r\n  <ejs-textbox\r\n    type=\"text\"\r\n    class=\"e-input\"\r\n    [(ngModel)]=\"searchValue\"\r\n    (input)=\"onInput($event)\"\r\n    [placeholder]=\"placeholder\"\r\n    [showClearButton]=\"true\"\r\n    autocomplete=\"off\"\r\n  ></ejs-textbox>\r\n</div>\r\n",
                    styles: [".rs-search-input{width:240px}.rs-search-input .e-textbox{display:block;box-shadow:none!important}.rs-search-input ::ng-deep .e-input-group{border-radius:14px!important}.rs-search-input ::ng-deep .e-input-group.e-input-focus,.rs-search-input ::ng-deep .e-input-group:hover{box-shadow:0 0 3px 0 rgba(31,123,255,.4)!important;border-color:var(--rs-input-hover-border-color)!important}.rs-search-input ::ng-deep .e-input-group.e-input-focus input.e-input,.rs-search-input ::ng-deep .e-input-group:hover input.e-input{box-shadow:none!important}.rs-search-input ::ng-deep .e-input-group input.e-input{width:calc(100% - 50px);height:24px!important;line-height:22px!important}.rs-search-input ::ng-deep .e-input-group input.e-input:hover{box-shadow:none!important}.rs-search-input ::ng-deep .e-input-group::before{content:\"\"!important;margin:5px 0 0 8px;display:block;width:16px;height:16px;background-image:url(/assets/img/search.svg);background-size:cover;background-position:center}"]
                }] }
    ];
    /** @nocollapse */
    SearchInputComponent.ctorParameters = function () { return []; };
    SearchInputComponent.propDecorators = {
        placeholder: [{ type: Input }],
        hanleSearch: [{ type: Output }],
        handleInput: [{ type: Output }]
    };
    return SearchInputComponent;
}());
export { SearchInputComponent };
if (false) {
    /** @type {?} */
    SearchInputComponent.prototype.placeholder;
    /** @type {?} */
    SearchInputComponent.prototype.hanleSearch;
    /** @type {?} */
    SearchInputComponent.prototype.handleInput;
    /**
     * @type {?}
     * @private
     */
    SearchInputComponent.prototype.debouncedInput;
    /** @type {?} */
    SearchInputComponent.prototype.searchValue;
    /** @type {?} */
    SearchInputComponent.prototype.translation;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vcmFpc2UtY29tbW9uLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9mb3JtL3NlYXJjaC1pbnB1dC9pbmRleC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7O0FBQ0EsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMvRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sUUFBUSxDQUFDO0F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