/**
 * @fileoverview added by tsickle
 * Generated from: lib/layout/grid-box/index.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
// 组件类
import { Component, ContentChild, EventEmitter, Input, Output, ViewChild, } from "@angular/core";
import { CommonGridComponent } from "../../common-grid/index.component";
import { GridComponent } from "@syncfusion/ej2-angular-grids";
import { TreeGridComponent } from "@syncfusion/ej2-angular-treegrid";
import { SearchInputComponent } from "../../form/search-input/index.component";
import { getTranslation } from "../../utils/utils";
var GridBoxComponent = /** @class */ (function () {
    function GridBoxComponent() {
        this.hideSearch = false;
        this.isInner = false;
        this.onGridSearch = new EventEmitter();
        this.hasWholeToolbarSlot = false;
    }
    /**
     * @return {?}
     */
    GridBoxComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.getInfo();
    };
    /**
     * @return {?}
     */
    GridBoxComponent.prototype.getInfo = /**
     * @return {?}
     */
    function () {
        this.translation = getTranslation();
    };
    /**
     * @return {?}
     */
    GridBoxComponent.prototype.ngAfterContentInit = /**
     * @return {?}
     */
    function () {
        // 检测是否传入了 wholeToolbarSlot
        this.hasWholeToolbarSlot = !!this.wholeToolbarSlot;
    };
    /**
     * @param {?} value
     * @return {?}
     */
    GridBoxComponent.prototype.setSearchValue = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        this.searchInput.searchValue = value;
        this.onSeach(value);
    };
    /**
     * @param {?} value
     * @return {?}
     */
    GridBoxComponent.prototype.onSeach = /**
     * @param {?} value
     * @return {?}
     */
    function (value) {
        if (this.gridContent) {
            this.gridContent.grid.search(value);
        }
        else if (this.orignGrid) {
            this.orignGrid.search(value);
        }
        else if (this.treeGrid) {
            this.treeGrid.search(value);
        }
        else {
            this.onGridSearch.emit(value);
        }
    };
    GridBoxComponent.decorators = [
        { type: Component, args: [{
                    selector: "rs-grid-box",
                    template: "<div class=\"rs-grid-box\" [ngClass]=\"{ 'is-not-inner': !isInner }\">\r\n  <div class=\"rs-content-tab\">\r\n    <ng-content select=\"[contentTabSlot]\"></ng-content>\r\n  </div>\r\n  <div class=\"rs-toolbar-wrap\">\r\n    <div class=\"rs-whole-bar\" *ngIf=\"hasWholeToolbarSlot\">\r\n      <ng-content select=\"[wholeToolbarSlot]\"></ng-content>\r\n    </div>\r\n    <div class=\"rs-left-col\" *ngIf=\"!hasWholeToolbarSlot\">\r\n      <ng-content select=\"[leftToolbarBtnSlot]\"></ng-content>\r\n    </div>\r\n    <div class=\"rs-right-col\" *ngIf=\"!hasWholeToolbarSlot\">\r\n      <ng-content select=\"[rightToolbarBtnSlot]\"></ng-content>\r\n      <rs-search-input\r\n          #searchInput\r\n          *ngIf=\"!hideSearch\"\r\n          [placeholder]=\"translation.SEARCH_ALL_FIELD\"\r\n          (hanleSearch)=\"onSeach($event)\"\r\n        ></rs-search-input>\r\n    </div>\r\n  </div>\r\n  <div class=\"rs-grid-wrap\">\r\n    <ng-content select=\"[gridSlot]\"></ng-content>\r\n  </div>\r\n</div>\r\n",
                    styles: [":host{height:100%}.rs-grid-box{display:flex;flex-direction:column;height:100%}.rs-grid-box.is-not-inner{border-radius:15px;padding:12px 20px;background:#fff;border:1px solid var(--rs-border-color);box-shadow:0 0 4px 0 rgba(0,0,0,.1)}.rs-grid-box .rs-toolbar-wrap{display:flex;justify-content:space-between;align-items:center;padding-bottom:4px;border-bottom:1px solid #eaedf0}.rs-grid-box .rs-toolbar-wrap .rs-whole-bar{width:100%}.rs-grid-box .rs-toolbar-wrap .rs-left-col,.rs-grid-box .rs-toolbar-wrap .rs-right-col{display:flex;align-items:center}.rs-grid-box .rs-toolbar-wrap .rs-left-col ::ng-deep .e-btn,.rs-grid-box .rs-toolbar-wrap .rs-right-col ::ng-deep .e-btn{height:24px!important;min-width:auto!important}.rs-grid-box .rs-toolbar-wrap .rs-left-col{flex:1;width:0;gap:4px}.rs-grid-box .rs-toolbar-wrap .rs-right-col{gap:12px}.rs-grid-box .rs-grid-wrap{flex:1;height:0}"]
                }] }
    ];
    GridBoxComponent.propDecorators = {
        gridContent: [{ type: ContentChild, args: [CommonGridComponent, { static: false },] }],
        orignGrid: [{ type: ContentChild, args: [GridComponent, { static: false },] }],
        treeGrid: [{ type: ContentChild, args: [TreeGridComponent, { static: false },] }],
        wholeToolbarSlot: [{ type: ContentChild, args: ["wholeToolbarSlot", { static: false },] }],
        searchInput: [{ type: ViewChild, args: ["searchInput", { static: false },] }],
        hideSearch: [{ type: Input }],
        isInner: [{ type: Input }],
        onGridSearch: [{ type: Output }]
    };
    return GridBoxComponent;
}());
export { GridBoxComponent };
if (false) {
    /** @type {?} */
    GridBoxComponent.prototype.gridContent;
    /** @type {?} */
    GridBoxComponent.prototype.orignGrid;
    /** @type {?} */
    GridBoxComponent.prototype.treeGrid;
    /** @type {?} */
    GridBoxComponent.prototype.wholeToolbarSlot;
    /** @type {?} */
    GridBoxComponent.prototype.searchInput;
    /** @type {?} */
    GridBoxComponent.prototype.hideSearch;
    /** @type {?} */
    GridBoxComponent.prototype.isInner;
    /** @type {?} */
    GridBoxComponent.prototype.onGridSearch;
    /** @type {?} */
    GridBoxComponent.prototype.hasWholeToolbarSlot;
    /** @type {?} */
    GridBoxComponent.prototype.translation;
}
//# sourceMappingURL=data:application/json;base64, 