/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/appointment/details/appointment-details.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, EventEmitter, Output } from '@angular/core';
import { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
export class AppointmentDetailsComponent extends AbstractDetailsComponent {
    constructor() {
        super();
        this.callOpenFile = new EventEmitter();
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        if (this.inData) {
            this.appointment = this.inData.appointment ? this.inData.appointment : null;
            this.files = this.inData.files ? this.inData.files : [];
        }
    }
    /**
     * @param {?} i
     * @return {?}
     */
    openFile(i) {
        this.callOpenFile.emit(i);
    }
}
AppointmentDetailsComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-appointment-details',
                template: "<ion-grid *ngIf=\"appointment\">\r\n  <ion-row>\r\n    <ion-col size=\"12\">\r\n      <ion-item lines=\"none\" class=\"ion-no-padding\">\r\n        <ion-badge color=\"light\" slot=\"start\" *ngIf=\"inData.appointment.serviceType && inData.appointment.serviceType[0]\" class=\"ion-padding\"\r\n          style=\"min-width: 100px;\">\r\n          {{inData.appointment.serviceType[0].text | uppercase | translate}}\r\n        </ion-badge>\r\n        <ion-label *ngIf=\"inData.appointment.participant && inData.appointment.participant[0] && inData.appointment.participant[0].actor\">\r\n          <ion-text color=\"primary\" *ngIf=\"inData.appointment.created\">\r\n            <p>{{'CREATED' | translate}}:<br>\r\n              {{inData.appointment.created | date:'yyyy.MM.dd'}}</p>\r\n          </ion-text>\r\n          {{inData.appointment.participant[0].actor.display}}\r\n        </ion-label>\r\n        <ion-label *ngIf=\"inData.appointment.participant && inData.appointment.participant[2] && inData.appointment.participant[2].actor && inData.appointment.meta\">\r\n          <ion-text color=\"primary\" *ngIf=\"inData.appointment.created\">\r\n            <p>{{'LAST_MODIFIED' | translate}}: <br>\r\n              {{inData.appointment.meta.lastUpdated| date:'yyyy.MM.dd'}}</p>\r\n          </ion-text>\r\n          {{inData.appointment.participant[2].actor.display}}\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.appointment.description\">\r\n    <ion-col size=\"12\">\r\n      <p>{{inData.appointment.description}}</p>\r\n    </ion-col>\r\n  </ion-row>\r\n  <ion-row *ngIf=\"appointment.supportingInformation && appointment.supportingInformation[0] && appointment.supportingInformation[0].reference\">\r\n    <ion-col size=\"12\">\r\n      <ion-chip *ngFor=\"let supporting of appointment.supportingInformation; let i = index\" outline=\"true\" (click)=\"openFile(i)\">\r\n        <ion-label *ngIf=\"supporting.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 */
AppointmentDetailsComponent.ctorParameters = () => [];
AppointmentDetailsComponent.propDecorators = {
    callOpenFile: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    AppointmentDetailsComponent.prototype.appointment;
    /** @type {?} */
    AppointmentDetailsComponent.prototype.files;
    /** @type {?} */
    AppointmentDetailsComponent.prototype.callOpenFile;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBwb2ludG1lbnQtZGV0YWlscy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AaW5jbG91ZGVkL2lvbmljNC1pbmNsb3VkZWQtbGliLyIsInNvdXJjZXMiOlsibGliL2ZoaXIvYXBwb2ludG1lbnQvZGV0YWlscy9hcHBvaW50bWVudC1kZXRhaWxzLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOz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