import { __decorate } from "tslib";
import { Component, Input } from '@angular/core';
let GridDesktopColumnChildrenViewComponent = class GridDesktopColumnChildrenViewComponent {
    constructor() { }
};
__decorate([
    Input()
], GridDesktopColumnChildrenViewComponent.prototype, "column", void 0);
__decorate([
    Input()
], GridDesktopColumnChildrenViewComponent.prototype, "item", void 0);
GridDesktopColumnChildrenViewComponent = __decorate([
    Component({
        selector: 'sd-grid-desktop-column-children-view',
        template: "<ng-container *ngIf=\"column.children?.length\">\r\n  <div class=\"row mx-n2 c-cell-padding\">\r\n    <div *ngFor=\"let childColumn of column.children | filterMobile:item\" class=\"px-2\"\r\n      [ngClass]=\"{'col-sm-6': childColumn?.colSpan === 1, 'col-sm-12': !childColumn?.colSpan || childColumn?.colSpan === 2}\">\r\n      <span class=\"c-title\">\r\n        {{item | columnTitle:childColumn.title:childColumn.dynamicTitle | async}}:\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'string'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\">\r\n        <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n          (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | valueTransform:item:childColumn}}</a>\r\n        <ng-container *ngIf=\"!childColumn.click\">\r\n          {{item[childColumn.field] | valueTransform:item:childColumn}}</ng-container>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'number'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\">\r\n        <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n          (click)=\"childColumn.click(item[childColumn.field], item)\">{{(item[childColumn.field]  | valueTransform:item:childColumn) | number : '1.0-2'}}</a>\r\n        <ng-container *ngIf=\"!childColumn.click\">\r\n          {{(item[childColumn.field]  | valueTransform:item:childColumn) | number : '1.0-2'}}\r\n        </ng-container>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'datetime'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\">\r\n        <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n          (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.timeDifferent | async}}</a>\r\n        <ng-container *ngIf=\"!childColumn.click\">\r\n          <span matTooltipPosition=\"above\"\r\n            [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy HH:mm'\">{{item[childColumn.field] | sdTimeDifferent:'dd/MM/yyyy HH:mm':childColumn.timeDifferent | async}}</span>\r\n        </ng-container>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'date'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\">\r\n        <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n          (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | sdTimeDifferent:'dd/MM/yyyy':childColumn.timeDifferent | async}}</a>\r\n        <ng-container *ngIf=\"!childColumn.click\">\r\n          <span matTooltipPosition=\"above\"\r\n            [matTooltip]=\"item[childColumn.field] | date:'dd/MM/yyyy'\">{{item[childColumn.field] | sdTimeDifferent:'dd/MM/yyyy':childColumn.timeDifferent | async}}</span>\r\n        </ng-container>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'time'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\">\r\n        <a *ngIf=\"childColumn.click\" href=\"javascript:;\"\r\n          (click)=\"childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field] | date:'HH:mm'}}</a>\r\n        <ng-container *ngIf=\"!childColumn.click\">\r\n          {{item[childColumn.field] | date:'HH:mm'}}\r\n        </ng-container>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'bool'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\"\r\n        (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n        <strong *ngIf=\"item[childColumn.field]\" class=\"text-success\">{{childColumn.trueValue || 'True'}}</strong>\r\n        <strong *ngIf=\"!item[childColumn.field]\" class=\"text-danger\">{{childColumn.falseValue || 'False'}}</strong>\r\n      </span>\r\n      <span *ngIf=\"childColumn.type === 'color'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\"\r\n        (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\"><input disabled=\"true\"\r\n          type=\"color\" class=\"form-control form-control-sm\" [(ngModel)]=\"item[childColumn.field]\"></span>\r\n      <ng-container *ngIf=\"childColumn.type === 'values'\">\r\n        <ng-container *ngIf=\"childColumn?.dictionary[item[childColumn.field]] as dic; else elseNotInDic\">\r\n          <span *ngIf=\"dic.color || dic.backgroundColor; else elseNoStatus\" class=\"status c-children\"\r\n            [ngStyle]=\"{'color':dic.color, 'background-color': dic.backgroundColor}\">\r\n            {{dic.text}}\r\n          </span>\r\n          <ng-template #elseNoStatus>\r\n            <span [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n              [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\"\r\n              (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n              {{dic.text}}\r\n            </span>\r\n          </ng-template>\r\n        </ng-container>\r\n        <ng-template #elseNotInDic>\r\n          <span [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n            [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\"\r\n            (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">\r\n            {{item[childColumn.field]}}\r\n          </span>\r\n        </ng-template>\r\n      </ng-container>\r\n      <span *ngIf=\"childColumn.type === 'radio'\"\r\n        [className]=\"item[childColumn.field] | cellDesktopClassName:item:childColumn:true\"\r\n        [ngClass]=\"{'blinker': item.blinker && item.blinker[childColumn.field]}\"\r\n        (click)=\"childColumn.click && childColumn.click(item[childColumn.field], item)\">{{item[childColumn.field]}}</span>\r\n      <img *ngIf=\"childColumn.type === 'image'\" [src]=\"item[childColumn.field]\" [width]=\"childColumn.display?.width\"\r\n        [height]=\"childColumn.display?.height\" style=\"margin: 5px 0\"\r\n        (click)=\"column.click && column.click(item[column.field], item)\">\r\n    </div>\r\n  </div>\r\n</ng-container>",
        styles: [".c-title{font-size:13px;margin-right:3px;font-weight:700;color:#212529;line-height:1.7}.c-badge{display:block!important;border-radius:10rem;font-weight:500;max-width:80%;margin:0 auto;padding:5px!important;font-size:14px;color:#212529}.c-badge a{color:#fff}.c-children{font-size:14px;overflow-wrap:break-word;color:#212529}.status{font-weight:500;padding:4px 8px;border-radius:1.5rem;display:inline-block;text-align:left!important;text-transform:uppercase}.status-success{color:#00bc3c}.status-danger{color:#f5222d}.c-btn-icon{background:0 0!important;border:none;opacity:.8;height:20px;display:inline-flex;padding:0 3px}.c-btn-icon:hover{cursor:pointer;opacity:1}.c-btn-icon:disabled{background:0 0!important;border:none;cursor:not-allowed;opacity:.3}"]
    })
], GridDesktopColumnChildrenViewComponent);
export { GridDesktopColumnChildrenViewComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZXNrdG9wLWNvbHVtbi1jaGlsZHJlbi12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3N1cGVyZGV2LWFuZ3VsYXItY29yZS8iLCJzb3VyY2VzIjpbImxpYi9jb250cm9scy9ncmlkLWNvb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