import { Component, Input } from '@angular/core';
export class SdGridDesktopColumnView {
    constructor() { }
}
SdGridDesktopColumnView.decorators = [
    { type: Component, args: [{
                selector: 'sd-grid-desktop-column-view',
                template: "<ng-container *ngIf=\"column && item\">\r\n  <ng-container *ngIf=\"column.htmlTemplate;else useDefaultView\">\r\n    <div (click)=\"column.click && column.click(item[column.field], item)\" [ngClass]=\"{'cursor-pointer':column.click}\"\r\n      [innerHTML]=\"(item[column.field] | columnHtmlTemplate:item:column.htmlTemplate) | safeHtml\">\r\n    </div>\r\n  </ng-container>\r\n  <ng-template #useDefaultView>\r\n    <div *ngIf=\"column.type === 'string'\">\r\n      <span [className]=\"item[column.field] | cellDesktopClassName:item:column\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[column.field]}\">\r\n        <a *ngIf=\"column.click\" href=\"javascript:;\"\r\n          (click)=\"column.click(item[column.field], item)\">{{item[column.field] | valueTransform:item:column}}</a>\r\n        <ng-container *ngIf=\"!column.click\">{{item[column.field] | valueTransform:item:column}}</ng-container>\r\n      </span>\r\n      <ng-container *ngIf=\"column.commands | columnCommandFilter:item | async; $implicit as filteredColumnCommands\">\r\n        <button *ngFor=\"let columnCommand of filteredColumnCommands\" (click)=\"columnCommand.click(item)\" type=\"button\"\r\n          class=\"c-btn-icon\" [matTooltip]=\"columnCommand.title | commandTitle:item\">\r\n          <i class=\"{{columnCommand.icon | commandIcon:item}}\" aria-hidden=\"true\"></i>\r\n        </button>\r\n      </ng-container>\r\n    </div>\r\n    <div *ngIf=\"column.type === 'color'\">\r\n      <input disabled=\"true\" type=\"color\" class=\"form-control form-control-sm\" [(ngModel)]=\"item[column.field]\"\r\n        (change)=\"column.editor?.change && column.editor.change(item)\">\r\n    </div>\r\n    <div *ngIf=\"column.type === 'number'\">\r\n      <span [className]=\"item[column.field] | cellDesktopClassName:item:column\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[column.field]}\">\r\n        <a *ngIf=\"column.click\" href=\"javascript:;\"\r\n          (click)=\"column.click(item[column.field], item)\">{{item[column.field] | valueTransform:item:column}}</a>\r\n        <ng-container *ngIf=\"!column.click\">\r\n          {{item[column.field] | valueTransform:item:column}}</ng-container>\r\n      </span>\r\n    </div>\r\n    <div *ngIf=\"column.type === 'date'\" class=\"text-center\" matTooltipPosition=\"above\"\r\n      [matTooltip]=\"item[column.field] | date:'dd/MM/yyyy'\">\r\n      {{item[column.field] | sdTimeDifferent:'dd/MM/yyyy':column.timeDifferent | async}}\r\n    </div>\r\n    <div *ngIf=\"column.type === 'datetime'\" class=\"text-center\" matTooltipPosition=\"above\"\r\n      [matTooltip]=\"item[column.field] | date:'dd/MM/yyyy HH:mm'\">\r\n      {{item[column.field] | sdTimeDifferent:'dd/MM/yyyy HH:mm':column.timeDifferent | async}}\r\n    </div>\r\n    <div *ngIf=\"column.type === 'time'\" class=\"text-center\">\r\n      {{item[column.field] | date:'HH:mm'}}\r\n    </div>\r\n    <div class=\"align-middle text-center\" *ngIf=\"column.type === 'bool'\">\r\n      <span *ngIf=\"!item.editorHandler[column.field].visible && item[column.field]\"\r\n        class=\"status status-success\">{{column.trueValue || 'True'}}</span>\r\n      <span *ngIf=\"!item.editorHandler[column.field].visible && !item[column.field]\"\r\n        class=\"status status-danger\">{{column.falseValue || 'False'}}</span>\r\n    </div>\r\n    <div *ngIf=\"column.type === 'values'\">\r\n      <ng-container *ngIf=\"item[column.field] | columnValues:column.values; $implicit as valueData\">\r\n        <div *ngIf=\"valueData.color || valueData.backgroundColor; else elseNoStatus\" class=\"status\"\r\n          [ngStyle]=\"{'color':valueData.color, 'background-color': valueData.backgroundColor}\">\r\n          {{valueData.text}}\r\n        </div>\r\n        <ng-template #elseNoStatus>\r\n          <div class=\"text-left\">\r\n            {{valueData.text}}\r\n          </div>\r\n        </ng-template>\r\n      </ng-container>\r\n    </div>\r\n    <div *ngIf=\"column.type === 'radio'\">\r\n      {{item[column.field]}}\r\n    </div>\r\n    <div class=\"align-middle text-center\" *ngIf=\"column.type === 'image'\">\r\n      <img *ngIf=\"item[column.field]\" [src]=\"item[column.field]\" [width]=\"column.display?.width\"\r\n        [height]=\"column.display?.height\" style=\"margin: 5px 0;object-fit: contain;\"\r\n        (click)=\"column.click && column.click(item[column.field], item)\" [ngClass]=\"{'c-clickable':column.click}\">\r\n      <i *ngIf=\"!item[column.field]\" class=\"fa fa-picture-o fa-fw c-img\" [ngClass]=\"{'c-clickable':column.click}\"\r\n        (click)=\"column.click && column.click(item[column.field], item)\"></i>\r\n    </div>\r\n  </ng-template>\r\n</ng-container>",
                styles: [".text-black400{color:#757575}.c-badge{border-radius:10rem;display:block!important;font-size:12px;font-weight:500;margin:0 auto;max-width:80%;padding:.3rem!important}.c-badge a{color:#fff}.status{border-radius:1.5rem;display:inline-block;font-weight:500;padding:4px 8px;text-align:center;text-transform:uppercase;width:100%}.status-success{color:#4caf50}.status-danger{color:#f82c13}.c-btn-icon{background:none!important;border:none;display:inline-flex;height:20px;opacity:.8;padding:0 3px}.c-btn-icon:hover{cursor:pointer;opacity:1}.c-btn-icon:disabled{background:none!important;border:none;cursor:not-allowed;opacity:.3}.c-clickable{cursor:pointer}.c-img{font-size:30px;opacity:.5}.c-img.c-clickable:hover{opacity:.9}"]
            },] }
];
SdGridDesktopColumnView.ctorParameters = () => [];
SdGridDesktopColumnView.propDecorators = {
    column: [{ type: Input }],
    item: [{ type: Input }]
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZXNrdG9wLWNvbHVtbi12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJDOi9Vc2Vycy9uZ2hpYXR0MTVfb25lbW91bnQvRG9jdW1lbnRzL2xpYi1jb3JlLXVpL3Byb2plY3RzL3NkLWNvcmUvZ3JpZC8iLCJzb3VyY2VzIjpbInNyYy9saWIvY29tcG9uZW50cy9ncmlkLWRlc2t0b3AtY29sdW1uLXZpZXcvZ3JpZC1kZXNrdG9wLWNvbHVtbi12aWV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