/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/device/details/device-details.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Output, EventEmitter } from '@angular/core';
import { Router } from '@angular/router';
import { AlertService } from '../../../widgets/entry-components/alert/services/alert.service';
import { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
export class DeviceDetailsComponent extends AbstractDetailsComponent {
    /**
     * @param {?} router
     * @param {?} alertService
     */
    constructor(router, alertService) {
        super();
        this.router = router;
        this.alertService = alertService;
        this.callDelete = new EventEmitter();
    }
    /**
     * @return {?}
     */
    navToUpdate() {
        this.router.navigateByUrl('/device-add', { state: { parameter: this.inData } });
    }
    /**
     * @param {?} id
     * @param {?} identifier
     * @return {?}
     */
    deleteDeviceAlert(id, identifier) {
        this.alertService.presentDelete(identifier, 'DEVICE', (/**
         * @return {?}
         */
        () => { this.callDelete.emit(id); }));
    }
}
DeviceDetailsComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-device-details',
                template: "<ion-grid class=\"ion-margin\" *ngIf=\"inData\">\r\n  <ion-row>\r\n    <ion-col size=\"12\" sizeMd=\"6\">\r\n      <ion-text color=\"medium\">\r\n        <p>{{'INVENTORY_ID' | translate}}</p>\r\n      </ion-text>\r\n      <b>{{inData.identifier[0].value}}</b>\r\n    </ion-col>\r\n    <ion-col size=\"12\" sizeMd=\"6\" *ngIf=\"inData.serialNumber\">\r\n      <ion-text color=\"medium\">\r\n        <p>{{'SERIALNUMBER' | translate}}</p>\r\n      </ion-text>\r\n      <b>{{inData.serialNumber}}</b>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row>\r\n    <ion-col size=\"12\" sizeMd=\"4\">\r\n      <ion-text color=\"medium\">\r\n        <p>{{'MANUFACTURER' | translate}}</p>\r\n      </ion-text>\r\n      <b>{{inData.manufacturer}}</b>\r\n    </ion-col>\r\n    <ion-col size=\"12\" sizeMd=\"4\">\r\n      <ion-text color=\"medium\">\r\n        <p>{{'MODELL' | translate}}</p>\r\n      </ion-text>\r\n      <b>{{inData.modelNumber}}</b>\r\n    </ion-col>\r\n    <ion-col size=\"12\" sizeMd=\"4\">\r\n      <ion-text color=\"medium\">\r\n        <p>{{'TYPE' | translate}}</p>\r\n      </ion-text>\r\n      <b class=\"ion-text-capitalize\">{{inData.type.text | translate}}</b>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row *ngIf=\"inData.note && inData.note[0].text\">\r\n    <ion-col>\r\n      <ion-text color=\"medium\">\r\n        <p>{{'DESCRIPTION' | translate}}</p>\r\n      </ion-text>\r\n      <p class=\"note-border ion-no-margin ion-padding\"><b>{{inData.note[0].text}}</b></p>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row class=\"ion-float-right ion-margin-bottom ion-margin-top\">\r\n    <ion-button id=\"delete-button\" fill=\"outline\" color=\"danger\" class=\"ion-margin-end\"\r\n      (click)=\"deleteDeviceAlert(inData.id, inData.identifier[0].value)\">\r\n      <ion-icon slot=\"start\" name=\"close\">\r\n      </ion-icon>{{'DELETE' | translate}}\r\n    </ion-button>\r\n    <ion-button id=\"edit-button\" (click)=\"navToUpdate()\" fill=\"outline\">\r\n      <ion-icon slot=\"start\" name=\"create\"></ion-icon>{{'EDIT' | translate}}\r\n    </ion-button>\r\n  </ion-row>\r\n</ion-grid>",
                styles: [".note-border{border:2px solid var(--ion-color-medium);border-radius:4px}"]
            }] }
];
/** @nocollapse */
DeviceDetailsComponent.ctorParameters = () => [
    { type: Router },
    { type: AlertService }
];
DeviceDetailsComponent.propDecorators = {
    callDelete: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    DeviceDetailsComponent.prototype.callDelete;
    /**
     * @type {?}
     * @private
     */
    DeviceDetailsComponent.prototype.router;
    /**
     * @type {?}
     * @private
     */
    DeviceDetailsComponent.prototype.alertService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaW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