import { Component, Input } from '@angular/core';
import { get } from 'lodash-es';
import { gettext } from '@c8y/ngx-components';
import { TranslateService } from '@ngx-translate/core';
import * as i0 from "@angular/core";
import * as i1 from "@ngx-translate/core";
import * as i2 from "@c8y/ngx-components";
import * as i3 from "@angular/common";
import * as i4 from "@c8y/ngx-components/operations/stepper-frames";
export class ConfirmDeviceProfileSelectionStepComponent {
    constructor(translate) {
        this.translate = translate;
        this.DEVICE_TYPE_NOT_DEFINED = gettext('Device type not defined');
    }
    get softwares() {
        return get(this.selectedDeviceProfile, ['c8y_DeviceProfile', 'software'], []);
    }
    get configurations() {
        return get(this.selectedDeviceProfile, ['c8y_DeviceProfile', 'configuration'], []);
    }
    getDeviceTypeTitle(deviceProfile) {
        return get(deviceProfile, 'c8y_Filter.type', this.translate.instant(this.DEVICE_TYPE_NOT_DEFINED));
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmDeviceProfileSelectionStepComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: ConfirmDeviceProfileSelectionStepComponent, selector: "c8y-confirm-device-profile-selection-step", inputs: { selectedDeviceProfile: "selectedDeviceProfile" }, ngImport: i0, template: "<c8y-preview-selection-frame\n  [header]=\"'Confirm selection' | translate\"\n  [name]=\"selectedDeviceProfile?.name\"\n>\n  <ng-container *previewBlock=\"'Device type' | translate\">\n    <ng-container *ngIf=\"selectedDeviceProfile?.c8y_Filter?.type; else noType\">\n      <span>{{ selectedDeviceProfile.c8y_Filter.type }}</span>\n    </ng-container>\n    <ng-template #noType> --- </ng-template>\n  </ng-container>\n  <c8y-list-group\n    *previewBlock=\"'Firmware' | translate; if: selectedDeviceProfile?.c8y_DeviceProfile.firmware\"\n  >\n    <c8y-li>\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-firmware\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ selectedDeviceProfile.c8y_DeviceProfile.firmware.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"text-label-small m-r-8\" translate> Version </span>\n          <span>\n            {{ selectedDeviceProfile.c8y_DeviceProfile.firmware.version }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n  <c8y-list-group *previewBlock=\"'Software' | translate; if: softwares?.length\">\n    <c8y-li *ngFor=\"let software of softwares\">\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-tools\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ software.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"text-label-small m-r-8\" translate> Version </span>\n          <span>\n            {{ software.version }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n  <c8y-list-group *previewBlock=\"'Configuration' | translate; if: configurations?.length\">\n    <c8y-li *ngFor=\"let configuration of configurations\">\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-tools\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ configuration.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"label label-info\" *ngIf=\"configuration.type\">\n            {{ configuration.type }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n</c8y-preview-selection-frame>\n", dependencies: [{ kind: "directive", type: i2.IconDirective, selector: "[c8yIcon]", inputs: ["c8yIcon"] }, { kind: "directive", type: i2.C8yTranslateDirective, selector: "[translate],[ngx-translate]" }, { kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ListGroupComponent, selector: "c8y-list-group" }, { kind: "component", type: i2.ListItemComponent, selector: "c8y-list-item, c8y-li", inputs: ["active", "highlighted", "emptyActions", "dense", "collapsed", "selectable"], outputs: ["collapsedChange"] }, { kind: "component", type: i2.ListItemIconComponent, selector: "c8y-list-item-icon, c8y-li-icon", inputs: ["icon", "status"] }, { kind: "component", type: i2.ListItemBodyComponent, selector: "c8y-list-item-body, c8y-li-body", inputs: ["body"] }, { kind: "component", type: i4.PreviewSelectionFrameComponent, selector: "c8y-preview-selection-frame", inputs: ["header", "name", "description", "type"] }, { kind: "directive", type: i4.PreviewBlockDirective, selector: "[previewBlock]", inputs: ["previewBlock", "previewBlockIf"] }, { kind: "pipe", type: i2.C8yTranslatePipe, name: "translate" }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ConfirmDeviceProfileSelectionStepComponent, decorators: [{
            type: Component,
            args: [{ selector: 'c8y-confirm-device-profile-selection-step', template: "<c8y-preview-selection-frame\n  [header]=\"'Confirm selection' | translate\"\n  [name]=\"selectedDeviceProfile?.name\"\n>\n  <ng-container *previewBlock=\"'Device type' | translate\">\n    <ng-container *ngIf=\"selectedDeviceProfile?.c8y_Filter?.type; else noType\">\n      <span>{{ selectedDeviceProfile.c8y_Filter.type }}</span>\n    </ng-container>\n    <ng-template #noType> --- </ng-template>\n  </ng-container>\n  <c8y-list-group\n    *previewBlock=\"'Firmware' | translate; if: selectedDeviceProfile?.c8y_DeviceProfile.firmware\"\n  >\n    <c8y-li>\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-firmware\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ selectedDeviceProfile.c8y_DeviceProfile.firmware.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"text-label-small m-r-8\" translate> Version </span>\n          <span>\n            {{ selectedDeviceProfile.c8y_DeviceProfile.firmware.version }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n  <c8y-list-group *previewBlock=\"'Software' | translate; if: softwares?.length\">\n    <c8y-li *ngFor=\"let software of softwares\">\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-tools\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ software.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"text-label-small m-r-8\" translate> Version </span>\n          <span>\n            {{ software.version }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n  <c8y-list-group *previewBlock=\"'Configuration' | translate; if: configurations?.length\">\n    <c8y-li *ngFor=\"let configuration of configurations\">\n      <c8y-li-icon>\n        <i c8yIcon=\"c8y-tools\"></i>\n      </c8y-li-icon>\n      <c8y-li-body class=\"content-flex-500\">\n        <div class=\"col-5\">\n          {{ configuration.name }}\n        </div>\n        <div class=\"col-5\">\n          <span class=\"label label-info\" *ngIf=\"configuration.type\">\n            {{ configuration.type }}\n          </span>\n        </div>\n      </c8y-li-body>\n    </c8y-li>\n  </c8y-list-group>\n</c8y-preview-selection-frame>\n" }]
        }], ctorParameters: () => [{ type: i1.TranslateService }], propDecorators: { selectedDeviceProfile: [{
                type: Input
            }] } });
//# sourceMappingURL=data:application/json;base64, 