import { __decorate } from "tslib";
import { Component, Input } from '@angular/core';
var GridDesktopColumnChildrenViewComponent = /** @class */ (function () {
    function GridDesktopColumnChildrenViewComponent() {
    }
    __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);
    return GridDesktopColumnChildrenViewComponent;
}());
export { GridDesktopColumnChildrenViewComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZXNrdG9wLWNvbHVtbi1jaGlsZHJlbi12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3N1cGVyZGV2LWFuZ3VsYXItY29yZS8iL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