import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "@angular/cdk/scrolling";
export class TableTbodyComponent {
    constructor() {
        this.dataSource = [];
        this.nestedLayer = 0;
        this.nestedIndex = '-1';
    }
    ngOnInit() { }
    trackByFn(index) {
        return index;
    }
}
TableTbodyComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableTbodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
TableTbodyComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TableTbodyComponent, selector: "[dTableBody]", inputs: { dataSource: "dataSource", rowTemplete: "rowTemplete", nestedLayer: "nestedLayer", nestedIndex: "nestedIndex", virtualScroll: "virtualScroll", tableWidthConfig: "tableWidthConfig", minHeight: "minHeight", minHeightStretchRow: "minHeightStretchRow" }, queries: [{ propertyName: "rowTempleteForSelect", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"!virtualScroll; else scrollViewTpl\">\n  <ng-container *ngFor=\"let rowItem of dataSource; trackBy: trackByFn; let rowIndex = index\">\n    <ng-template\n      [ngTemplateOutlet]=\"trTable\"\n      [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n    >\n    </ng-template>\n  </ng-container>\n</ng-container>\n\n<ng-template #scrollViewTpl>\n  <ng-container *cdkVirtualFor=\"let rowItem of dataSource; trackBy: trackByFn; let rowIndex = index\">\n    <ng-template\n      [ngTemplateOutlet]=\"trTable\"\n      [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n    >\n    </ng-template>\n  </ng-container>\n</ng-template>\n\n<ng-template #trTable let-rowIndex=\"rowIndex\" let-rowItem=\"rowItem\" let-nestedLayer=\"nestedLayer\" let-nestedIndex=\"nestedIndex\">\n  <ng-template\n    [ngTemplateOutlet]=\"rowTemplete\"\n    [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n  ></ng-template>\n  <tr class=\"child-table\" *ngIf=\"rowItem['children'] && rowItem['$isChildTableOpen']\" [style.height]=\"minHeight ? '40px' : null\">\n    <td [attr.colspan]=\"tableWidthConfig.length\">\n      <table class=\"devui-table\" [style.table-layout]=\"'fixed'\">\n        <colgroup>\n          <col [style.width]=\"config.width\" *ngFor=\"let config of tableWidthConfig\" />\n        </colgroup>\n        <tbody\n          dTableBody\n          [rowTemplete]=\"rowTemplete\"\n          [dataSource]=\"rowItem['children']\"\n          [tableWidthConfig]=\"tableWidthConfig\"\n          [nestedLayer]=\"nestedLayer + 1\"\n          [nestedIndex]=\"nestedIndex + ',' + rowIndex\"\n        ></tbody>\n      </table>\n    </td>\n  </tr>\n</ng-template>\n\n<ng-template [ngTemplateOutlet]=\"minHeightStretchRow\"></ng-template>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}.detail-content{color:#252b3a;color:var(--devui-text, #252b3a);font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;background-color:#f5f5f5;background-color:var(--devui-area, #f5f5f5)}.child-table:hover{background:transparent!important}.child-table .devui-table{background:transparent;margin-bottom:0}.child-table>td{padding:0;border:0}::ng-deep .devui-table tbody>tr.expand-row{background:#f7f8fa;background:var(--devui-table-expand-area-bg, #f7f8fa)}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.CdkVirtualForOf, selector: "[cdkVirtualFor][cdkVirtualForOf]", inputs: ["cdkVirtualForOf", "cdkVirtualForTrackBy", "cdkVirtualForTemplate", "cdkVirtualForTemplateCacheSize"] }, { kind: "component", type: TableTbodyComponent, selector: "[dTableBody]", inputs: ["dataSource", "rowTemplete", "nestedLayer", "nestedIndex", "virtualScroll", "tableWidthConfig", "minHeight", "minHeightStretchRow"] }] });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TableTbodyComponent, decorators: [{
            type: Component,
            args: [{ selector: '[dTableBody]', template: "<ng-container *ngIf=\"!virtualScroll; else scrollViewTpl\">\n  <ng-container *ngFor=\"let rowItem of dataSource; trackBy: trackByFn; let rowIndex = index\">\n    <ng-template\n      [ngTemplateOutlet]=\"trTable\"\n      [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n    >\n    </ng-template>\n  </ng-container>\n</ng-container>\n\n<ng-template #scrollViewTpl>\n  <ng-container *cdkVirtualFor=\"let rowItem of dataSource; trackBy: trackByFn; let rowIndex = index\">\n    <ng-template\n      [ngTemplateOutlet]=\"trTable\"\n      [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n    >\n    </ng-template>\n  </ng-container>\n</ng-template>\n\n<ng-template #trTable let-rowIndex=\"rowIndex\" let-rowItem=\"rowItem\" let-nestedLayer=\"nestedLayer\" let-nestedIndex=\"nestedIndex\">\n  <ng-template\n    [ngTemplateOutlet]=\"rowTemplete\"\n    [ngTemplateOutletContext]=\"{ rowItem: rowItem, rowIndex: rowIndex, nestedLayer: nestedLayer, nestedIndex: nestedIndex }\"\n  ></ng-template>\n  <tr class=\"child-table\" *ngIf=\"rowItem['children'] && rowItem['$isChildTableOpen']\" [style.height]=\"minHeight ? '40px' : null\">\n    <td [attr.colspan]=\"tableWidthConfig.length\">\n      <table class=\"devui-table\" [style.table-layout]=\"'fixed'\">\n        <colgroup>\n          <col [style.width]=\"config.width\" *ngFor=\"let config of tableWidthConfig\" />\n        </colgroup>\n        <tbody\n          dTableBody\n          [rowTemplete]=\"rowTemplete\"\n          [dataSource]=\"rowItem['children']\"\n          [tableWidthConfig]=\"tableWidthConfig\"\n          [nestedLayer]=\"nestedLayer + 1\"\n          [nestedIndex]=\"nestedIndex + ',' + rowIndex\"\n        ></tbody>\n      </table>\n    </td>\n  </tr>\n</ng-template>\n\n<ng-template [ngTemplateOutlet]=\"minHeightStretchRow\"></ng-template>\n", styles: [".devui-font-size-base{font-size:12px;font-size:var(--devui-font-size, 12px)}.devui-font-base{font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;line-height:1.5}.devui-font-size-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px)}.devui-font-modal-title{font-size:18px;font-size:var(--devui-font-size-modal-title, 18px);font-weight:700;line-height:1.5}.devui-font-size-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px)}.devui-font-page-title{font-size:16px;font-size:var(--devui-font-size-page-title, 16px);font-weight:700;line-height:1.5}.devui-font-size-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px)}.devui-font-secondary-title{font-size:14px;font-size:var(--devui-font-size-card-title, 14px);font-weight:700;line-height:1.5}.detail-content{color:#252b3a;color:var(--devui-text, #252b3a);font-size:12px;font-size:var(--devui-font-size, 12px);font-weight:400;background-color:#f5f5f5;background-color:var(--devui-area, #f5f5f5)}.child-table:hover{background:transparent!important}.child-table .devui-table{background:transparent;margin-bottom:0}.child-table>td{padding:0;border:0}::ng-deep .devui-table tbody>tr.expand-row{background:#f7f8fa;background:var(--devui-table-expand-area-bg, #f7f8fa)}\n"] }]
        }], ctorParameters: function () { return []; }, propDecorators: { dataSource: [{
                type: Input
            }], rowTemplete: [{
                type: Input
            }], nestedLayer: [{
                type: Input
            }], nestedIndex: [{
                type: Input
            }], virtualScroll: [{
                type: Input
            }], tableWidthConfig: [{
                type: Input
            }], minHeight: [{
                type: Input
            }], minHeightStretchRow: [{
                type: Input
            }], rowTempleteForSelect: [{
                type: ContentChild,
                args: [TemplateRef]
            }] } });
//# sourceMappingURL=data:application/json;base64, 