import { Component, Input } from '@angular/core';
export class ZUITableMenuComponent {
    constructor() {
        this.action = (item, index) => {
            var _a, _b;
            const value = (_a = this.row) === null || _a === void 0 ? void 0 : _a[(_b = this.column) === null || _b === void 0 ? void 0 : _b.field];
            if (item === null || item === void 0 ? void 0 : item.action)
                item.action(value, this.row, index);
        };
    }
}
ZUITableMenuComponent.decorators = [
    { type: Component, args: [{
                selector: 'zui-table-menu',
                template: "<ng-container *ngIf=\"column.display === 'group'\">\n  <zui-menu type=\"icon\" icon=\"more_vert\" [items]=\"column.items\" [widthPanel]=\"column.widthPanel\"></zui-menu>\n</ng-container>\n<ng-container *ngIf=\"column.display === 'single'\">\n  <ng-container *ngFor=\"let item of column?.items; let index = index\">\n    <zui-button *ngIf=\"!item.hide\" type=\"icon\" [icon]=\"item.icon\" [color]=\"item.color\" [matTooltip]=\"item.label\" [disabled]=\"item.disabled\" (action)=\"action(item, index)\"></zui-button>\n  </ng-container>\n</ng-container>\n",
                styles: [".zui-table table{width:100%}.zui-table-set-height{overflow:hidden;display:flex;flex-direction:column}.zui-table-container{flex:1;overflow-y:auto}.zui-table-container-hide-scrollbar{overflow:hidden}.zui-table-container-hide-scrollbar:hover{padding:0}.zui-table-highlight:hover{background-color:var(--hoverHighlightColor)}.zui-table-highlight-checked,.zui-table-highlight-checked:hover{background-color:var(--checkedHighlightColor)}.zui-table-expanded-detail{overflow:hidden}.zui-table-time{color:grey}:host ::ng-deep .zui-table-head{vertical-align:middle;font-weight:700;font-size:15px;padding:0 10px}:host ::ng-deep .zui-table-head.mat-header-cell:first-of-type{padding-left:10px}:host ::ng-deep .zui-table-head.mat-header-cell:last-of-type{padding-right:10px}:host ::ng-deep .zui-table-head-left>div{justify-content:left}:host ::ng-deep .zui-table-head-center>div{justify-content:center}:host ::ng-deep .zui-table-head-right>div{justify-content:right}:host ::ng-deep .zui-table-content{padding:0 10px}:host ::ng-deep .zui-table-content.mat-cell:first-of-type{padding-left:10px}:host ::ng-deep .zui-table-content.mat-cell:last-of-type{padding-right:10px}:host ::ng-deep .zui-table-footer{padding:10px 0;text-align:center}:host ::ng-deep .zui-table-footer.mat-footer-cell:first-of-type{padding-left:10px}:host ::ng-deep .zui-table-footer.mat-footer-cell:last-of-type{padding-right:10px}"]
            },] }
];
ZUITableMenuComponent.propDecorators = {
    column: [{ type: Input }],
    row: [{ type: Input }]
};
//# sourceMappingURL=index.component.js.map