/**
 * @fileoverview added by tsickle
 * Generated from: lib/layout/page-list/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";
export class RsPageListComponent {
    constructor() {
        this.customPageTitle = false;
        this.hideSearch = false;
        this.isInner = false;
        this.onGridSearch = new EventEmitter();
        this.hasWholeToolbarSlot = false;
        this.hasLeftContentSlot = false;
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.getInfo();
    }
    /**
     * @return {?}
     */
    getInfo() {
        this.translation = getTranslation();
    }
    /**
     * @return {?}
     */
    ngAfterContentInit() {
        // 检测是否传入了 wholeToolbarSlot
        this.hasWholeToolbarSlot = !!this.wholeToolbarSlot;
        this.hasLeftContentSlot = !!this.leftContentSlot;
    }
    /**
     * @param {?} value
     * @return {?}
     */
    setSearchValue(value) {
        this.searchInput.searchValue = value;
        this.onSeach(value);
    }
    /**
     * @param {?} value
     * @return {?}
     */
    onSeach(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);
        }
    }
}
RsPageListComponent.decorators = [
    { type: Component, args: [{
                selector: "rs-page-list",
                template: "<div class=\"rs-page-list-wrap\" [ngClass]=\"{ 'is-not-inner': !isInner }\">\r\n  <ng-container *ngIf=\"customPageTitle; else defaultTitle\">\r\n    <ng-content select=\"[titleSlot]\"></ng-content>\r\n  </ng-container>\r\n  <ng-template #defaultTitle>\r\n    <h1 class=\"rs-page-title\" *ngIf=\"pageTitle\">{{ pageTitle }}</h1>\r\n  </ng-template>\r\n  <div class=\"rs-sub-section\">\r\n    <ng-content select=\"[subSectionSlot]\"></ng-content>\r\n  </div>\r\n  <div\r\n    class=\"rs-content-wrap\"\r\n    [ngClass]=\"{ 'has-left-content': hasLeftContentSlot }\"\r\n  >\r\n    <div class=\"rs-left-content\" *ngIf=\"hasLeftContentSlot\">\r\n      <ng-content select=\"[leftContentSlot]\"></ng-content>\r\n    </div>\r\n    <div class=\"rs-right-content\">\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  </div>\r\n</div>\r\n",
                styles: [".rs-page-list-wrap{height:100%;display:flex;flex-direction:column;position:relative;margin:0 auto;max-width:1885px}.rs-page-list-wrap .rs-page-title{font-family:var(--rs-font-family);font-size:var(--rs-page-title-font-size);font-weight:700;text-align:left;color:var(--rs-page-title-color);display:flex;align-items:center;padding:16px 8px 12px 20px}.rs-page-list-wrap .rs-sub-section{width:100%}.rs-page-list-wrap .rs-content-wrap{display:flex;flex-direction:column;flex:1;height:0}.rs-page-list-wrap .rs-content-wrap .rs-left-content{height:100%}.rs-page-list-wrap .rs-content-wrap .rs-right-content{display:flex;flex-direction:column;flex:1;height:0}.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap{display:flex;justify-content:space-between;align-items:center;padding-bottom:4px;border-bottom:1px solid #eaedf0}.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-whole-bar{width:100%}.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-left-col,.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-right-col{display:flex;align-items:center}.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-left-col ::ng-deep .e-btn,.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-right-col ::ng-deep .e-btn{height:24px!important;min-width:auto!important}.rs-page-list-wrap .rs-content-wrap .rs-toolbar-wrap .rs-right-col{gap:12px}.rs-page-list-wrap .rs-content-wrap .rs-left-col{flex:1;width:0;gap:4px}.rs-page-list-wrap .rs-content-wrap .rs-grid-wrap{flex:1;height:0}.rs-page-list-wrap.is-not-inner .rs-content-wrap{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-page-list-wrap .rs-content-wrap.has-left-content{flex-direction:row}.rs-page-list-wrap .rs-content-wrap.has-left-content .rs-right-content{height:auto;width:0}"]
            }] }
];
RsPageListComponent.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 },] }],
    leftContentSlot: [{ type: ContentChild, args: ["leftContentSlot", { static: false },] }],
    pageTitle: [{ type: Input }],
    customPageTitle: [{ type: Input }],
    hideSearch: [{ type: Input }],
    isInner: [{ type: Input }],
    onGridSearch: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    RsPageListComponent.prototype.gridContent;
    /** @type {?} */
    RsPageListComponent.prototype.orignGrid;
    /** @type {?} */
    RsPageListComponent.prototype.treeGrid;
    /** @type {?} */
    RsPageListComponent.prototype.wholeToolbarSlot;
    /** @type {?} */
    RsPageListComponent.prototype.searchInput;
    /** @type {?} */
    RsPageListComponent.prototype.leftContentSlot;
    /** @type {?} */
    RsPageListComponent.prototype.pageTitle;
    /** @type {?} */
    RsPageListComponent.prototype.customPageTitle;
    /** @type {?} */
    RsPageListComponent.prototype.hideSearch;
    /** @type {?} */
    RsPageListComponent.prototype.isInner;
    /** @type {?} */
    RsPageListComponent.prototype.onGridSearch;
    /** @type {?} */
    RsPageListComponent.prototype.hasWholeToolbarSlot;
    /** @type {?} */
    RsPageListComponent.prototype.hasLeftContentSlot;
    /** @type {?} */
    RsPageListComponent.prototype.translation;
}
//# sourceMappingURL=data:application/json;base64, 