/**
 * @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 * as tslib_1 from "tslib";
import { Component, Input } from '@angular/core';
import { AbstractDetailsComponent } from '../../../shared/abstracts/details/abstract-details/abstract-details.component';
var CareplanDetailsChangesComponent = /** @class */ (function (_super) {
    tslib_1.__extends(CareplanDetailsChangesComponent, _super);
    function CareplanDetailsChangesComponent() {
        var _this = _super.call(this) || this;
        _this.goalAuditEvents = [];
        _this.definitionEvents = [];
        return _this;
    }
    /**
     * @return {?}
     */
    CareplanDetailsChangesComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        this.setEvents();
    };
    /**
     * @return {?}
     */
    CareplanDetailsChangesComponent.prototype.setEvents = /**
     * @return {?}
     */
    function () {
        var _this = this;
        if (this.audit && this.audit[0]) {
            this.audit.map((/**
             * @param {?} audi
             * @return {?}
             */
            function (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 = function () { return []; };
    CareplanDetailsChangesComponent.propDecorators = {
        audit: [{ type: Input }]
    };
    return CareplanDetailsChangesComponent;
}(AbstractDetailsComponent));
export { CareplanDetailsChangesComponent };
if (false) {
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.audit;
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.goalAuditEvents;
    /** @type {?} */
    CareplanDetailsChangesComponent.prototype.definitionEvents;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FyZXBsYW4tZGV0YWlscy1jaGFuZ2V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