/**
 * @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 { Component, Output, EventEmitter } from '@angular/core';
import { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
export class ConditionDetailsComponent extends AbstractDetailsComponent {
    constructor() {
        super();
        this.callOpenFile = new EventEmitter();
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        if (this.inData) {
            this.condition = this.inData.condition ? this.inData.condition : null;
            this.files = this.inData.files ? this.inData.files : [];
        }
    }
    /**
     * @param {?} i
     * @return {?}
     */
    openFile(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 = () => [];
ConditionDetailsComponent.propDecorators = {
    callOpenFile: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    ConditionDetailsComponent.prototype.condition;
    /** @type {?} */
    ConditionDetailsComponent.prototype.files;
    /** @type {?} */
    ConditionDetailsComponent.prototype.callOpenFile;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZGl0aW9uLWRldGFpbHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2Vz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