import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
export class SdDesktopCellView {
    constructor() { }
}
SdDesktopCellView.decorators = [
    { type: Component, args: [{
                selector: 'sd-desktop-cell-view',
                template: "<ng-container *ngIf=\"item[column.field] | cellView:item:column:gridOption | async as view\">\r\n  <ng-container *ngIf=\"view.display.hasHtml;else useValue\">\r\n    <div *ngIf=\"view.click\" (click)=\"view.click()\" class=\"text-break cursor-pointer\" [matTooltip]=\"view.tooltip\"\r\n      [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n      [innerHTML]=\"view.display.html | safeHtml\">\r\n    </div>\r\n    <div *ngIf=\"!view.click\" class=\"text-break\" [matTooltip]=\"view.tooltip\"\r\n      [class.text-center]=\"view.display.align === 'center'\" [class.text-right]=\"view.display.align === 'right'\"\r\n      [innerHTML]=\"view.display.html | safeHtml\">\r\n    </div>\r\n  </ng-container>\r\n  <ng-template #useValue>\r\n    <ng-container *ngIf=\"!!view.badge; else noBadge\">\r\n      <sd-badge *ngIf=\"view.display.value\" [type]=\"view.badge.type\" [title]=\"view.display.value\" [color]=\"view.badge.color\"\r\n        [icon]=\"view.badge.icon\" [tooltip]=\"view.tooltip\" (sdClick)=\"!!view.click && view.click()\"></sd-badge>\r\n    </ng-container>\r\n    <ng-template #noBadge>\r\n      <ng-container *ngIf=\"column.type !== 'children'; else childrenView\">\r\n        <div *ngIf=\"column.type !== 'image'\" class=\"text-break\" [class.text-center]=\"view.display.align === 'center'\"\r\n          [class.text-right]=\"view.display.align === 'right'\" [matTooltip]=\"view.tooltip\">\r\n          <a *ngIf=\"!!view.click\" href=\"javascript:;\" (click)=\"view.click()\">{{view.display.value}}</a>\r\n          <ng-container *ngIf=\"!view.click\">{{view.display.value}}\r\n          </ng-container>\r\n        </div>\r\n        <div *ngIf=\"column.type === 'image'\" class=\"align-middle text-center\">\r\n          <img *ngIf=\"view.display.value\" [src]=\"view.display.value\" [width]=\"column.option?.width\"\r\n            [height]=\"column.option?.height\" class=\"c-image\" (click)=\"!!view.click && view.click()\"\r\n            [class.cursor-pointer]=\"!!view.click\">\r\n          <mat-icon *ngIf=\"!view.display.value\" class=\"c-img\" [class.cursor-pointer]=\"!!view.click\"\r\n            (click)=\"!!view.click && view.click()\">\r\n            image</mat-icon>\r\n        </div>\r\n      </ng-container>\r\n      <ng-template #childrenView>\r\n        <sd-desktop-cell-children-view [key]=\"key\" [item]=\"item\" [column]=\"column\">\r\n        </sd-desktop-cell-children-view>\r\n      </ng-template>\r\n    </ng-template>\r\n  </ng-template>\r\n</ng-container>",
                changeDetection: ChangeDetectionStrategy.OnPush,
                styles: [".text-black400{color:#757575}.c-color-success{color:#4caf50}.c-color-danger{color:#f82c13}.c-image{-o-object-fit:contain;margin:5px 0;object-fit:contain}.c-img{font-size:30px;opacity:.5}.c-img.pointer:hover{opacity:.9}"]
            },] }
];
SdDesktopCellView.ctorParameters = () => [];
SdDesktopCellView.propDecorators = {
    sdId: [{ type: Input }],
    key: [{ type: Input }],
    column: [{ type: Input }],
    item: [{ type: Input }],
    gridOption: [{ type: Input }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVza3RvcC1jZWxsLXZpZXcuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IkM6L1VzZXJzL25naGlhdHQxNV9vbmVtb3VudC9Eb2N1bWVudHMvbGliLWNvcmUtdWkvcHJvamVjdHMvc2QtY29yZS9ncmlkLW1hdGVyaWFsLyIsInNvdXJjZXMiOlsic3JjL2xpYi9jb21wb25lbnRzL2Rlc2t0b3AtY2VsbC12aWV3L2Rlc2t0b3AtY2VsbC12aWV3LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsdUJBQXVCLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBYSxNQUFNLGVBQWUsQ0FBQztBQVVyRixNQUFNLE9BQU8saUJBQWlCO0lBTTVCL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