import { __decorate } from "tslib";
import { Component, Input } from '@angular/core';
let GridMobileColumnViewComponent = class GridMobileColumnViewComponent {
    constructor() { }
};
__decorate([
    Input()
], GridMobileColumnViewComponent.prototype, "column", void 0);
__decorate([
    Input()
], GridMobileColumnViewComponent.prototype, "item", void 0);
GridMobileColumnViewComponent = __decorate([
    Component({
        selector: 'sd-grid-desktop-mobile-view',
        template: "<!-- <ng-container *ngIf=\"column && item\">\r\n  <div class=\"row c-mobile-row\" (click)=\"check(item)\">\r\n    <div class=\"col-5\">\r\n      <span class=\"c-mobile-title\">\r\n        {{item | columnTitle:column.title:column.dynamicTitle | async}}:\r\n      </span>\r\n    </div>\r\n    <div class=\"col-7\">\r\n      <ng-container *ngIf=\"column.htmlTemplate;else useDefaultView\">\r\n        <span class=\"c-mobile-value\"\r\n          [innerHTML]=\"(item[column.field] | columnHtmlTemplate:item:column.htmlTemplate) | safeHtml\"></span>\r\n      </ng-container>\r\n      <ng-template #useDefaultView>\r\n        <div class=\"row c-mobile-row\" (click)=\"check(item)\">\r\n          <div class=\"col-5\">\r\n            <span class=\"c-mobile-title\">\r\n              {{item | columnTitle:column.title:column.dynamicTitle | async}}:\r\n            </span>\r\n          </div>\r\n          <div class=\"col-7\">\r\n            <ng-container *ngIf=\"column.type === 'string'\">\r\n              <span *ngIf=\"!column.htmlTemplate; else elseUseTemplate\"\r\n                [className]=\"item[column.field] | cellClassName: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]}}</a>\r\n                <ng-container *ngIf=\"!column.click\">\r\n                  {{item[column.field]}}</ng-container>\r\n              </span>\r\n              <ng-template #elseUseTemplate>\r\n                <span class=\"c-mobile-value\"\r\n                  [innerHTML]=\"(item[column.field] | columnHtmlTemplate:item:column.htmlTemplate) | safeHtml\"></span>\r\n              </ng-template>\r\n              <ng-container\r\n                *ngIf=\"column.commands | columnCommandFilter:item | async; $implicit as filteredColumnCommands\">\r\n                <button *ngFor=\"let columnCommand of filteredColumnCommands\" (click)=\"columnCommand.click(item)\"\r\n                  type=\"button\" class=\"c-btn-icon\" [matTooltip]=\"columnCommand.title | commandTitle:item\">\r\n                  <i class=\"{{columnCommand.icon | commandIcon:item}}\" aria-hidden=\"true\" style=\"font-size: 14px;\"></i>\r\n                </button>\r\n              </ng-container>\r\n            </ng-container>\r\n            <span *ngIf=\"column.type === 'number'\" [className]=\"item[column.field] | cellClassName: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) | number : '1.0-2'}}</a>\r\n              <ng-container *ngIf=\"!column.click\">\r\n                {{(item[column.field] | valueTransform:item:column) | number : '1.0-2'}}</ng-container>\r\n            </span>\r\n            <span *ngIf=\"column.type === 'datetime'\" [className]=\"item[column.field] | cellClassName: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] | date:'dd/MM/yyyy HH:mm'}}</a>\r\n              <ng-container *ngIf=\"!column.click\">\r\n                {{item[column.field] | date:'dd/MM/yyyy HH:mm'}}</ng-container>\r\n            </span>\r\n            <span *ngIf=\"column.type === 'date'\" [className]=\"item[column.field] | cellClassName: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] | date:'dd/MM/yyyy'}}</a>\r\n              <ng-container *ngIf=\"!column.click\">\r\n                {{item[column.field] | date:'dd/MM/yyyy'}}</ng-container>\r\n            </span>\r\n            <span *ngIf=\"column.type === 'time'\" [className]=\"item[column.field] | cellClassName: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] | date:'HH:mm'}}</a>\r\n              <ng-container *ngIf=\"!column.click\">\r\n                {{item[column.field] | date:'HH:mm'}}</ng-container>\r\n            </span>\r\n            <span *ngIf=\"column.type === 'bool'\" [className]=\"item[column.field] | cellClassName:item:column\"\r\n              [ngClass]=\"{'blinker': item.blinker && item.blinker[column.field]}\"\r\n              (click)=\"column.click && column.click(item[column.field], item)\">\r\n              <span *ngIf=\"item[column.field]\" class=\"status status-success\">{{column.trueValue || 'True'}}</span>\r\n              <span *ngIf=\"!item[column.field]\" class=\"status status-danger\">{{column.falseValue || 'False'}}</span>\r\n            </span>\r\n            <span *ngIf=\"column.type === 'color'\" class=\"c-mobile-value\"><input disabled=\"true\" type=\"color\"\r\n                class=\"form-control c-input-xs\" [(ngModel)]=\"item[column.field]\"></span>\r\n            <ng-container *ngIf=\"column.type === 'values'\">\r\n              <ng-container *ngIf=\"column?.dictionary[item[column.field]] as dic; else elseNotInDic\">\r\n                <span *ngIf=\"dic.color || dic.backgroundColor; else elseNoStatus\" class=\"status c-mobile-value\"\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 class=\"c-mobile-value\">\r\n                    {{dic.text}}\r\n                  </span>\r\n                </ng-template>\r\n              </ng-container>\r\n              <ng-template #elseNotInDic>\r\n                <span class=\"c-mobile-value\">\r\n                  {{item[column.field]}}\r\n                </span>\r\n              </ng-template>\r\n            </ng-container>\r\n            <span *ngIf=\"column.type === 'radio'\" class=\"c-mobile-value\">{{item[column.field]}}</span>\r\n            <img *ngIf=\"column.type === 'image'\" [src]=\"item[column.field]\" [width]=\"column.display?.width\"\r\n              [height]=\"column.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-template>\r\n    </div>\r\n  </div>\r\n</ng-container> -->",
        styles: [".c-badge{display:block!important;border-radius:10rem;padding:.3rem!important;font-weight:500;font-size:12px;max-width:80%;margin:0 auto}.c-badge a{color:#fff}.status{font-weight:500;padding:4px 8px;border-radius:1.5rem;display:inline-block;text-align:center;text-transform:uppercase;width:100%}.status-success{color:#4caf50}.status-danger{color:#f44336}.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}.c-clickable{cursor:pointer}.c-img{font-size:50px;opacity:.5}.c-img.c-clickable:hover{opacity:.9}"]
    })
], GridMobileColumnViewComponent);
export { GridMobileColumnViewComponent };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZXNrdG9wLW1vYmlsZS12aWV3LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL3N1cGVyZGV2LWFuZ3VsYXItY29yZS8iLCJzb3VyY2VzIjpbImxpYi9jb250cm9scy9ncmlkLWNvbnRyb2wvY29tcG9uZW50cy9ncmlkLWRlc2t0b3AtbW9iaWxlLXZpZXcvZ3JpZC1kZXNrdG9wLW1vYmlsZS12aWV3LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFTakQsSUFBYSw2QkFBNkIsR0FBMUMsTUFBYSw2QkFBNkI7SUFHeEMsZ0JBQ0ksQ0FBQztDQUNOLENBQUE7QUFKVTtJQUFSLEtBQUssRUFBRTs2REFBb0I7QUFDbkI7SUFBUixLQUFLLEVBQUU7MkRBQWdCO0FBRmIsNkJBQTZCO0lBTHpDLFNBQV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