/**
 * @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 * as tslib_1 from "tslib";
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';
var DeviceDetailsComponent = /** @class */ (function (_super) {
    tslib_1.__extends(DeviceDetailsComponent, _super);
    function DeviceDetailsComponent(router, alertService) {
        var _this = _super.call(this) || this;
        _this.router = router;
        _this.alertService = alertService;
        _this.callDelete = new EventEmitter();
        return _this;
    }
    /**
     * @return {?}
     */
    DeviceDetailsComponent.prototype.navToUpdate = /**
     * @return {?}
     */
    function () {
        this.router.navigateByUrl('/device-add', { state: { parameter: this.inData } });
    };
    /**
     * @param {?} id
     * @param {?} identifier
     * @return {?}
     */
    DeviceDetailsComponent.prototype.deleteDeviceAlert = /**
     * @param {?} id
     * @param {?} identifier
     * @return {?}
     */
    function (id, identifier) {
        var _this = this;
        this.alertService.presentDelete(identifier, 'DEVICE', (/**
         * @return {?}
         */
        function () { _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 = function () { return [
        { type: Router },
        { type: AlertService }
    ]; };
    DeviceDetailsComponent.propDecorators = {
        callDelete: [{ type: Output }]
    };
    return DeviceDetailsComponent;
}(AbstractDetailsComponent));
export { DeviceDetailsComponent };
if (false) {
    /** @type {?} */
    DeviceDetailsComponent.prototype.callDelete;
    /**
     * @type {?}
     * @private
     */
    DeviceDetailsComponent.prototype.router;
    /**
     * @type {?}
     * @private
     */
    DeviceDetailsComponent.prototype.alertService;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGV2aWNlLWRldGFpbHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9maGlyL2RldmljZS9kZXRhaWxzL2RldmljZS1kZXRhaWxzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7QUFDQSxPQUFPLEVBQUUsU0FBUyxFQUFpQixNQUFNLEVBQUUsWUFBWSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQy9FLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUN6QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZ0VBQWdFLENBQUM7QUFDOUYsT0FBTyxFQUFFLHdCQUF3QixFQUFFLE1BQU0sK0VBQStFLENBQUM7QUFFekg7SUFLNEMsa0RBQWlDO0lBRzNFLGdDQUFvQixNQUFjLEVBQVUsWUFBMEI7UUFBdEUsWUFDRSxpQkFBTyxTQUNSO1FBRm1CLFlBQU0sR0FBTixNQUFNLENBQVE7UUFBVSxrQkFBWSxHQUFaLFlBQVksQ0FBYztRQUY1RCxnQkFBVSxHQUFHLElBQUksWUFBWSxFQUFVLENBQUM7O0lBSWxELENBQUM7Ozs7SUFFRCw0Q0FBVzs7O0lBQVg7UUFDRSxJQUFJLENBQUMsTUFBTSxDQUFDLGFBQWEsQ0FBQyxhQUFhLEVBQUUsRUFBRSxLQUFLLEVBQUUsRUFBRSxTQUFTLEVBQUU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