/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/condition/details/condition-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 { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
var ConditionDetailsComponent = /** @class */ (function (_super) {
    tslib_1.__extends(ConditionDetailsComponent, _super);
    function ConditionDetailsComponent() {
        var _this = _super.call(this) || this;
        _this.callOpenFile = new EventEmitter();
        return _this;
    }
    /**
     * @return {?}
     */
    ConditionDetailsComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        if (this.inData) {
            this.condition = this.inData.condition ? this.inData.condition : null;
            this.files = this.inData.files ? this.inData.files : [];
        }
    };
    /**
     * @param {?} i
     * @return {?}
     */
    ConditionDetailsComponent.prototype.openFile = /**
     * @param {?} i
     * @return {?}
     */
    function (i) {
        this.callOpenFile.emit(i);
    };
    ConditionDetailsComponent.decorators = [
        { type: Component, args: [{
                    selector: 'inc-condition-details',
                    template: "<ion-grid *ngIf=\"inData && inData.condition\">\r\n  <ion-row>\r\n    <ion-col>\r\n      <ion-item lines=\"none\" class=\"ion-no-padding\">\r\n        <ion-badge color=\"light\" slot=\"start\" *ngIf=\"inData.condition.category && inData.condition.category[0]\" class=\"ion-padding\"\r\n          style=\"min-width: 100px;\">\r\n          {{inData.condition.category[0].text | uppercase | translate}}\r\n        </ion-badge>\r\n\r\n        <ion-label *ngIf=\"inData.condition.note && inData.condition.note[0] && inData.condition.note[0].authorReference\" style=\"flex: .4;\">\r\n          <ion-text color=\"primary\">\r\n            <p>{{'CREATED' | translate}}:<br>\r\n              {{inData.condition.note[0].time | date:'yyyy.MM.dd'}}</p>\r\n          </ion-text>\r\n          {{inData.condition.note[0].authorReference.display}}\r\n        </ion-label>\r\n        <ion-label *ngIf=\"inData.condition.note && inData.condition.note[1] && inData.condition.note[1].authorReference\" style=\"flex: .4;\">\r\n          <ion-text color=\"primary\">\r\n            <p>{{'LAST_MODIFIED' | translate}}: <br>\r\n              {{inData.condition.note[1].time | date:'yyyy.MM.dd'}}</p>\r\n          </ion-text>\r\n          {{inData.condition.note[1].authorReference.display}}\r\n        </ion-label>\r\n\r\n        <ion-label *ngIf=\"inData.condition.code && inData.condition.code.text\">\r\n          <ion-text color=\"primary\">\r\n            <p>{{inData.condition.code.coding[0].code}}</p>\r\n          </ion-text>\r\n          {{ inData.condition.code.text}}\r\n        </ion-label>\r\n        <ion-buttons slot=\"end\">\r\n          <ion-button (click)=\"more()\">\r\n            <ion-icon name=\"more\"></ion-icon>\r\n          </ion-button>\r\n        </ion-buttons>\r\n      </ion-item>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row *ngIf=\"inData.condition.note && inData.condition.note[0] && inData.condition.note[0].text\">\r\n    <ion-col>\r\n      <p>{{inData.condition.note[0].text}}</p>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row *ngIf=\"condition.evidence && condition.evidence[0] && condition.evidence[0].detail &&\r\n    condition.evidence[0].detail[0] && condition.evidence[0].detail[0].reference\">\r\n    <ion-col size=\"12\">\r\n      <ion-chip *ngFor=\"let detail of condition.evidence[0].detail; let i = index\" outline=\"true\" (click)=\"openFile(i)\">\r\n        <ion-label *ngIf=\"detail.reference.split('/') as _reference\">\r\n          {{_reference[_reference.length - 1]}}\r\n        </ion-label>\r\n      </ion-chip>\r\n    </ion-col>\r\n  </ion-row>\r\n</ion-grid>",
                    styles: ["ion-chip{color:var(--ion-color-primary)}"]
                }] }
    ];
    /** @nocollapse */
    ConditionDetailsComponent.ctorParameters = function () { return []; };
    ConditionDetailsComponent.propDecorators = {
        callOpenFile: [{ type: Output }]
    };
    return ConditionDetailsComponent;
}(AbstractDetailsComponent));
export { ConditionDetailsComponent };
if (false) {
    /** @type {?} */
    ConditionDetailsComponent.prototype.condition;
    /** @type {?} */
    ConditionDetailsComponent.prototype.files;
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