/**
 * @fileoverview added by tsickle
 * @suppress {checkTypes,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, EventEmitter, Input, Output } from '@angular/core';
/**
 * A search input for searching by keyword
 *
 * {\@link https://ng.ant.design/components/input/en#components-input-demo-search-input}
 */
var KengicSearchComponent = /** @class */ (function () {
    function KengicSearchComponent() {
        //region Input
        //region Input
        /**
         * The keyword
         */
        this.key = '';
        //endregion
        //region Output
        /**
         * The keyword change event
         */
        this.keyChange = new EventEmitter();
        /**
         * Clear the keyword
         */
        this.clear = new EventEmitter();
        /**
         * Press the `Enter` key or click the search button
         */
        this.search = new EventEmitter();
        //endregion
    }
    //endregion
    //region Method
    /**
     * Press the `Enter` key or click the search button
     */
    //endregion
    //region Method
    /**
     * Press the `Enter` key or click the search button
     * @return {?}
     */
    KengicSearchComponent.prototype.handleSearch = 
    //endregion
    //region Method
    /**
     * Press the `Enter` key or click the search button
     * @return {?}
     */
    function () {
        this.search.emit(this.key);
    };
    /**
     * Clear the keyword
     */
    /**
     * Clear the keyword
     * @return {?}
     */
    KengicSearchComponent.prototype.handleClear = /**
     * Clear the keyword
     * @return {?}
     */
    function () {
        this.keyChange.emit('');
        this.clear.emit();
    };
    KengicSearchComponent.decorators = [
        { type: Component, args: [{
                    selector: 'kengic-search',
                    template: "<nz-input-group [nzSearch]=\"true\" [nzAddOnAfter]=\"searchIcon\">\r\n  <input\r\n    type=\"text\"\r\n    nz-input\r\n    [ngStyle]=\"{\r\n      width: '200px'\r\n    }\"\r\n    [ngModel]=\"key\"\r\n    (ngModelChange)=\"keyChange.emit($event)\"\r\n    (keyup.enter)=\"handleSearch()\"\r\n  />\r\n</nz-input-group>\r\n\r\n<ng-template #searchIcon>\r\n  <nz-button-group>\r\n    <button\r\n      nz-button\r\n      [ngStyle]=\"{\r\n        borderRadius: '0px'\r\n      }\"\r\n      (click)=\"handleClear()\"\r\n    >\r\n      <i nz-icon nzType=\"close\" nzTheme=\"outline\"></i>\r\n    </button>\r\n    <button nz-button nzType=\"primary\" (click)=\"handleSearch()\">\r\n      <i nz-icon nzType=\"search\" nzTheme=\"outline\"></i>\r\n    </button>\r\n  </nz-button-group>\r\n</ng-template>\r\n"
                }] }
    ];
    KengicSearchComponent.propDecorators = {
        key: [{ type: Input }],
        keyChange: [{ type: Output }],
        clear: [{ type: Output }],
        search: [{ type: Output }]
    };
    return KengicSearchComponent;
}());
export { KengicSearchComponent };
if (false) {
    /**
     * The keyword
     * @type {?}
     */
    KengicSearchComponent.prototype.key;
    /**
     * The keyword change event
     * @type {?}
     */
    KengicSearchComponent.prototype.keyChange;
    /**
     * Clear the keyword
     * @type {?}
     */
    KengicSearchComponent.prototype.clear;
    /**
     * Press the `Enter` key or click the search button
     * @type {?}
     */
    KengicSearchComponent.prototype.search;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoia2VuZ2ljLXNlYXJjaC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9Aa2VuZ2ljL2ZlLW5nLyIsInNvdXJjZXMiOlsibGliL2NvbXBvbmVudC9zZWFyY2gva2VuZ2ljLXNlYXJjaC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7OztBQU92RTtJQUFBO1FBS0UsY0FBYzs7Ozs7UUFJUCxRQUFHLEdBQVcsRUFBRSxDQUFDOzs7Ozs7UUFRakIsY0FBUyxHQUF5QixJQUFJLFlBQVksRUFBRSxDQUFDOzs7O1FBSXJELFVBQUssR0FBeUIsSUFBSSxZQUFZLEVBQUUsQ0FBQzs7OztRQUlqRCxXQUFNLEdBQXlCLElBQUksWUFBWSxFQUFFLENBQUM7UUFxQnpELFdBQVc7SUFDYixDQUFDO0lBcEJDLFdBQVc7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