/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/care-plan/details-changes/careplan-details-changes.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
export class CareplanDetailsChangesComponent extends AbstractDetailsComponent {
    constructor() {
        super();
        this.goalAuditEvents = [];
        this.definitionEvents = [];
    }
    /**
     * @return {?}
     */
    ngOnInit() {
        this.setEvents();
    }
    /**
     * @return {?}
     */
    setEvents() {
        if (this.audit && this.audit[0]) {
            this.audit.map((/**
             * @param {?} audi
             * @return {?}
             */
            audi => {
                if (audi.type.display === 'goal') {
                    this.goalAuditEvents.push(audi);
                }
                else if (audi.type.display === 'atomic' || audi.type.display === 'aggregated') {
                    this.definitionEvents.push(audi);
                }
            }));
        }
    }
}
CareplanDetailsChangesComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-careplan-details-changes',
                template: "<ion-grid *ngIf=\"inData\" class=\"ion-padding\">\r\n  <ion-row class=\"ion-align-items-center\">\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.category && inData.category[0]\" class=\"ion-padding\"\r\n          style=\"min-width: 100px;\">\r\n          {{inData.category[0].text | uppercase | translate}}\r\n        </ion-badge>\r\n        <ion-label *ngIf=\"inData.author\">\r\n          <ion-text *ngIf=\"inData.created\">\r\n            <p>{{inData.created | date:'yyyy.MM.dd'}}</p>\r\n          </ion-text>\r\n          {{inData.author.display}}\r\n        </ion-label>\r\n      </ion-item>\r\n    </ion-col>\r\n    <ion-item-divider *ngIf=\"inData.title\">\r\n      <ion-text color=\"primary\">\r\n        <h4>{{inData.title}}</h4>\r\n      </ion-text>\r\n    </ion-item-divider>\r\n  </ion-row>\r\n</ion-grid>\r\n<mat-accordion multi=\"true\">\r\n  <mat-expansion-panel style=\"box-shadow: none\" *ngIf=\"goalAuditEvents && goalAuditEvents.length > 0\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-text color=\"primary\">\r\n          <h5><b>{{'GOALS' | translate}}</b></h5>\r\n        </ion-text>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <div>\r\n      <inc-details-changes [inData]=\"goalAuditEvents\"></inc-details-changes>\r\n    </div>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel style=\"box-shadow: none\" *ngIf=\"definitionEvents && definitionEvents.length > 0\">\r\n    <mat-expansion-panel-header> \r\n      <mat-panel-title>\r\n        <ion-text color=\"primary\">\r\n          <h5><b>{{'ALERTS' | translate}}</b></h5>\r\n        </ion-text>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <div>\r\n      <inc-details-changes [inData]=\"definitionEvents\"></inc-details-changes>\r\n    </div>\r\n  </mat-expansion-panel>\r\n</mat-accordion>",
                styles: [""]
            }] }
];
/** @nocollapse */
CareplanDetailsChangesComponent.ctorParameters = () => [];
CareplanDetailsChangesComponent.propDecorators = {
    audit: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.audit;
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.goalAuditEvents;
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.definitionEvents;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZXBsYW4tZGV0YWlscy1jaGFuZ2VzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvZmhpci9jYXJlLXBsYW4vZGV0YWlscy1jaGFuZ2VzL2NhcmVwbGFuLWRldGFpbHMtY2hhbmdlcy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6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