import { ChangeDetectionStrategy, Component, ContentChild, Directive, Input, TemplateRef, } from '@angular/core';
import * as i0 from "@angular/core";
function ListTableInTableComponent_thead_1_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
function ListTableInTableComponent_thead_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "thead")(1, "tr");
    i0.ɵɵtemplate(2, ListTableInTableComponent_thead_1_ng_container_2_Template, 1, 0, "ng-container", 3);
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("ngTemplateOutlet", ctx_r0.headerTemplate);
} }
function ListTableInTableComponent_ng_container_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainer(0);
} }
const _c0 = function (a0) { return { single: a0 }; };
const _c1 = function (a0) { return { $implicit: a0 }; };
function ListTableInTableComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵelementStart(1, "tr", 4);
    i0.ɵɵtemplate(2, ListTableInTableComponent_ng_container_3_ng_container_2_Template, 1, 0, "ng-container", 5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const row_r5 = ctx.$implicit;
    const ctx_r1 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0, ctx_r1.rows.length === 1));
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngTemplateOutlet", ctx_r1.bodyTemplate)("ngTemplateOutletContext", i0.ɵɵpureFunction1(5, _c1, row_r5));
} }
const _c2 = function (a0) { return { name: a0 }; };
function ListTableInTableComponent_tfoot_4_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "tfoot")(1, "tr")(2, "td", 6);
    i0.ɵɵtext(3);
    i0.ɵɵpipe(4, "translate");
    i0.ɵɵpipe(5, "translate");
    i0.ɵɵelementEnd()()();
} if (rf & 2) {
    const ctx_r2 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("colSpan", ctx_r2.colSpan);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind2(4, 2, "no_named_data_hint", i0.ɵɵpureFunction1(7, _c2, ctx_r2.resourceName || i0.ɵɵpipeBind1(5, 5, "data"))), " ");
} }
function ListTableInTableComponent_ng_container_6_div_1_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "div", 8)(1, "span");
    i0.ɵɵtext(2);
    i0.ɵɵpipe(3, "translate");
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(4, "button", 9);
    i0.ɵɵtext(5);
    i0.ɵɵelementEnd();
    i0.ɵɵelementStart(6, "span");
    i0.ɵɵtext(7);
    i0.ɵɵpipe(8, "translate");
    i0.ɵɵelementEnd()();
} if (rf & 2) {
    const total_r7 = i0.ɵɵnextContext().ngIf;
    const ctx_r8 = i0.ɵɵnextContext();
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(3, 5, "total"));
    i0.ɵɵadvance(2);
    i0.ɵɵproperty("square", true)("auiTooltip", ctx_r8.tooltipTemplate);
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate1(" ", total_r7, " ");
    i0.ɵɵadvance(2);
    i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(8, 7, "ge"));
} }
function ListTableInTableComponent_ng_container_6_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementContainerStart(0);
    i0.ɵɵtemplate(1, ListTableInTableComponent_ng_container_6_div_1_Template, 9, 9, "div", 7);
    i0.ɵɵelementContainerEnd();
} if (rf & 2) {
    const total_r7 = ctx.ngIf;
    const ctx_r3 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵproperty("ngIf", total_r7 > ctx_r3.limit);
} }
export class ListTableInTableHeaderDirective {
    constructor(templateRef) {
        this.templateRef = templateRef;
    }
}
ListTableInTableHeaderDirective.ɵfac = function ListTableInTableHeaderDirective_Factory(t) { return new (t || ListTableInTableHeaderDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); };
ListTableInTableHeaderDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ListTableInTableHeaderDirective, selectors: [["", "aclListTableInTableHeader", ""]] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListTableInTableHeaderDirective, [{
        type: Directive,
        args: [{
                selector: '[aclListTableInTableHeader]',
            }]
    }], function () { return [{ type: i0.TemplateRef }]; }, null); })();
export class ListTableInTableBodyDirective {
    constructor(templateRef) {
        this.templateRef = templateRef;
    }
}
ListTableInTableBodyDirective.ɵfac = function ListTableInTableBodyDirective_Factory(t) { return new (t || ListTableInTableBodyDirective)(i0.ɵɵdirectiveInject(i0.TemplateRef)); };
ListTableInTableBodyDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: ListTableInTableBodyDirective, selectors: [["", "aclListTableInTableBody", ""]] });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListTableInTableBodyDirective, [{
        type: Directive,
        args: [{
                selector: '[aclListTableInTableBody]',
            }]
    }], function () { return [{ type: i0.TemplateRef }]; }, null); })();
export class ListTableInTableComponent {
    constructor() {
        this.limit = 2;
    }
}
ListTableInTableComponent.ɵfac = function ListTableInTableComponent_Factory(t) { return new (t || ListTableInTableComponent)(); };
ListTableInTableComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ListTableInTableComponent, selectors: [["acl-list-table-in-table"]], contentQueries: function ListTableInTableComponent_ContentQueries(rf, ctx, dirIndex) { if (rf & 1) {
        i0.ɵɵcontentQuery(dirIndex, ListTableInTableHeaderDirective, 7, TemplateRef);
        i0.ɵɵcontentQuery(dirIndex, ListTableInTableBodyDirective, 7, TemplateRef);
    } if (rf & 2) {
        let _t;
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.headerTemplate = _t.first);
        i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.bodyTemplate = _t.first);
    } }, inputs: { limit: "limit", rows: "rows", tooltipTemplate: "tooltipTemplate", colSpan: "colSpan", resourceName: "resourceName" }, decls: 7, vars: 4, consts: [[1, "acl-table-in-table"], [4, "ngIf"], [4, "ngFor", "ngForOf"], [4, "ngTemplateOutlet"], [3, "ngClass"], [4, "ngTemplateOutlet", "ngTemplateOutletContext"], [1, "!tw-text-center", 3, "colSpan"], ["class", "total-tips", 4, "ngIf"], [1, "total-tips"], ["aui-button", "text", "size", "mini", "auiTooltipType", "info", "auiTooltipTrigger", "click", "auiTooltipClass", "table-in-table-tooltip", "auiTooltipPosition", "bottom start", 3, "square", "auiTooltip"]], template: function ListTableInTableComponent_Template(rf, ctx) { if (rf & 1) {
        i0.ɵɵelementStart(0, "table", 0);
        i0.ɵɵtemplate(1, ListTableInTableComponent_thead_1_Template, 3, 1, "thead", 1);
        i0.ɵɵelementStart(2, "tbody");
        i0.ɵɵtemplate(3, ListTableInTableComponent_ng_container_3_Template, 3, 7, "ng-container", 2);
        i0.ɵɵelementEnd();
        i0.ɵɵtemplate(4, ListTableInTableComponent_tfoot_4_Template, 6, 9, "tfoot", 1);
        i0.ɵɵelementEnd();
        i0.ɵɵelementContainerStart(5);
        i0.ɵɵtemplate(6, ListTableInTableComponent_ng_container_6_Template, 2, 1, "ng-container", 1);
        i0.ɵɵelementContainerEnd();
    } if (rf & 2) {
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", ctx.headerTemplate);
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngForOf", ctx.rows == null ? null : ctx.rows.slice(0, ctx.limit));
        i0.ɵɵadvance(1);
        i0.ɵɵproperty("ngIf", !(ctx.rows == null ? null : ctx.rows.length));
        i0.ɵɵadvance(2);
        i0.ɵɵproperty("ngIf", ctx.rows == null ? null : ctx.rows.length);
    } }, styles: [".flex-layout[_nghost-%COMP%], .flex-layout   [_nghost-%COMP%]{overflow:hidden}.flex-layout[_nghost-%COMP%]     table, .flex-layout   [_nghost-%COMP%]     table{display:flex;flex-direction:column}.flex-layout[_nghost-%COMP%]     tr, .flex-layout   [_nghost-%COMP%]     tr{display:flex}.flex-layout[_nghost-%COMP%]     th, .flex-layout   [_nghost-%COMP%]     th, .flex-layout[_nghost-%COMP%]     td, .flex-layout   [_nghost-%COMP%]     td{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}  .aui-tooltip.table-in-table-tooltip{max-width:unset;padding:16px}.total-tips[_ngcontent-%COMP%]{padding-top:8px;border-top:1px solid rgb(var(--aui-color-n-8));line-height:20px;color:rgb(var(--aui-color-n-1))}.total-tips[_ngcontent-%COMP%]   .aui-button[_ngcontent-%COMP%]{font-size:14px}"], changeDetection: 0 });
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ListTableInTableComponent, [{
        type: Component,
        args: [{ selector: 'acl-list-table-in-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<table class=\"acl-table-in-table\">\n  <thead *ngIf=\"headerTemplate\">\n    <tr>\n      <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n    </tr>\n  </thead>\n  <tbody>\n    <ng-container *ngFor=\"let row of rows?.slice(0, limit)\">\n      <tr [ngClass]=\"{ single: rows.length === 1 }\">\n        <ng-container\n          *ngTemplateOutlet=\"bodyTemplate; context: { $implicit: row }\"\n        ></ng-container>\n      </tr>\n    </ng-container>\n  </tbody>\n  <tfoot *ngIf=\"!rows?.length\">\n    <tr>\n      <td\n        class=\"!tw-text-center\"\n        [colSpan]=\"colSpan\"\n      >\n        {{\n          'no_named_data_hint'\n            | translate: { name: resourceName || ('data' | translate) }\n        }}\n      </td>\n    </tr>\n  </tfoot>\n</table>\n<ng-container>\n  <ng-container *ngIf=\"rows?.length as total\">\n    <div\n      *ngIf=\"total > limit\"\n      class=\"total-tips\"\n    >\n      <span>{{ 'total' | translate }}</span>\n      <button\n        aui-button=\"text\"\n        [square]=\"true\"\n        size=\"mini\"\n        [auiTooltip]=\"tooltipTemplate\"\n        auiTooltipType=\"info\"\n        auiTooltipTrigger=\"click\"\n        auiTooltipClass=\"table-in-table-tooltip\"\n        auiTooltipPosition=\"bottom start\"\n      >\n        {{ total }}\n      </button>\n      <span>{{ 'ge' | translate }}</span>\n    </div>\n  </ng-container>\n</ng-container>\n", styles: [":host-context(.flex-layout){overflow:hidden}:host-context(.flex-layout) ::ng-deep table{display:flex;flex-direction:column}:host-context(.flex-layout) ::ng-deep tr{display:flex}:host-context(.flex-layout) ::ng-deep th,:host-context(.flex-layout) ::ng-deep td{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}::ng-deep .aui-tooltip.table-in-table-tooltip{max-width:unset;padding:16px}.total-tips{padding-top:8px;border-top:1px solid rgb(var(--aui-color-n-8));line-height:20px;color:rgb(var(--aui-color-n-1))}.total-tips .aui-button{font-size:14px}\n"] }]
    }], null, { headerTemplate: [{
            type: ContentChild,
            args: [ListTableInTableHeaderDirective, {
                    read: TemplateRef,
                    static: true,
                }]
        }], bodyTemplate: [{
            type: ContentChild,
            args: [ListTableInTableBodyDirective, {
                    read: TemplateRef,
                    static: true,
                }]
        }], limit: [{
            type: Input
        }], rows: [{
            type: Input
        }], tooltipTemplate: [{
            type: Input
        }], colSpan: [{
            type: Input
        }], resourceName: [{
            type: Input
        }] }); })();
//# sourceMappingURL=data:application/json;base64, 