import { Component, Input } from '@angular/core';
import { SmzEasyTableContentType } from '../../../models/smz-easy-table-contents';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common";
import * as i2 from "../../../../../modules/smz-menu/smz-menu.component";
import * as i3 from "../../../../../common/pipes/safe-html.pipe";
export class DesktopBodyComponent {
    constructor() {
        this.type = SmzEasyTableContentType;
    }
    ngOnInit() {
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DesktopBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.5", type: DesktopBodyComponent, selector: "[et-desktop-body]", inputs: { state: "state", dataSource: "dataSource", contentService: "contentService" }, ngImport: i0, template: "<ng-container *ngFor=\"let row of dataSource.viewport.paginator.data; let even = even; let odd = odd\">\r\n\r\n  <tr [ngClass]=\"even ? state.desktop.body.evenRow.styleClass : state.desktop.body.oddRow.styleClass\">\r\n\r\n    <ng-container *ngFor=\"let column of state.desktop.body.columns; let index = index\">\r\n\r\n      <td *ngIf=\"column.isVisible\" [ngClass]=\"column.styleClass\">\r\n\r\n        <ng-container [ngSwitch]=\"column.content.type\">\r\n\r\n          <ng-container *ngSwitchCase=\"type.TEXT\">\r\n            <div [innerHtml]=\"row[index] | safeHtml\"></div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.CUSTOM\">\r\n            <div>\r\n                <ng-container *ngTemplateOutlet=\"contentService.contentTemplate; context: { $implicit: row[index], row: row.raw, col: column }\"></ng-container>\r\n            </div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.DATA_TRANSFORM\">\r\n            <div [innerHtml]=\"$any(column.content).callback(row[index], row.raw, index) | safeHtml\" [ngClass]=\"$any(column.content).styleClass\"></div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.CALENDAR\">\r\n            <div>{{ row[index] | date: $any(column.content).format }}</div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.ACTION\">\r\n            <smz-menu [callback]=\"$any(column.content).callback\" [items]=\"$any(column.content).items\" [id]=\"row.id\" [data]=\"row.raw\"></smz-menu>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchDefault>-</ng-container>\r\n\r\n        </ng-container>\r\n\r\n      </td>\r\n\r\n    </ng-container>\r\n\r\n  </tr>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"dataSource.viewport.paginator.data?.length === 0\">\r\n  <tr [ngClass]=\"state.desktop.body.evenRow.styleClass\">\r\n    <td [colSpan]=\"state.desktop.head.visibleCount\" class=\"text-center py-2\">{{ state.locale.emptyMessage }}</td>\r\n  </tr>\r\n</ng-container>", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: i2.SmzMenuComponent, selector: "smz-menu", inputs: ["items", "callback", "data", "buttonClass", "styleClass", "icon", "behavior"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i3.SafeHtmlPipe, name: "safeHtml" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.5", ngImport: i0, type: DesktopBodyComponent, decorators: [{
            type: Component,
            args: [{ selector: '[et-desktop-body]', template: "<ng-container *ngFor=\"let row of dataSource.viewport.paginator.data; let even = even; let odd = odd\">\r\n\r\n  <tr [ngClass]=\"even ? state.desktop.body.evenRow.styleClass : state.desktop.body.oddRow.styleClass\">\r\n\r\n    <ng-container *ngFor=\"let column of state.desktop.body.columns; let index = index\">\r\n\r\n      <td *ngIf=\"column.isVisible\" [ngClass]=\"column.styleClass\">\r\n\r\n        <ng-container [ngSwitch]=\"column.content.type\">\r\n\r\n          <ng-container *ngSwitchCase=\"type.TEXT\">\r\n            <div [innerHtml]=\"row[index] | safeHtml\"></div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.CUSTOM\">\r\n            <div>\r\n                <ng-container *ngTemplateOutlet=\"contentService.contentTemplate; context: { $implicit: row[index], row: row.raw, col: column }\"></ng-container>\r\n            </div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.DATA_TRANSFORM\">\r\n            <div [innerHtml]=\"$any(column.content).callback(row[index], row.raw, index) | safeHtml\" [ngClass]=\"$any(column.content).styleClass\"></div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.CALENDAR\">\r\n            <div>{{ row[index] | date: $any(column.content).format }}</div>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchCase=\"type.ACTION\">\r\n            <smz-menu [callback]=\"$any(column.content).callback\" [items]=\"$any(column.content).items\" [id]=\"row.id\" [data]=\"row.raw\"></smz-menu>\r\n          </ng-container>\r\n\r\n          <ng-container *ngSwitchDefault>-</ng-container>\r\n\r\n        </ng-container>\r\n\r\n      </td>\r\n\r\n    </ng-container>\r\n\r\n  </tr>\r\n\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"dataSource.viewport.paginator.data?.length === 0\">\r\n  <tr [ngClass]=\"state.desktop.body.evenRow.styleClass\">\r\n    <td [colSpan]=\"state.desktop.head.visibleCount\" class=\"text-center py-2\">{{ state.locale.emptyMessage }}</td>\r\n  </tr>\r\n</ng-container>" }]
        }], ctorParameters: () => [], propDecorators: { state: [{
                type: Input
            }], dataSource: [{
                type: Input
            }], contentService: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 