/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/patient/list/patient-list.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
export class PatientListComponent {
    /**
     * @param {?} router
     */
    constructor(router) {
        this.router = router;
    }
    /**
     * @return {?}
     */
    ngOnInit() { }
    /**
     * @param {?} event
     * @return {?}
     */
    stopProp(event) {
        event.stopPropagation();
    }
    /**
     * @param {?} url
     * @param {?} patient
     * @param {?=} event
     * @return {?}
     */
    navigateTo(url, patient, event) {
        if (event) {
            event.stopPropagation();
        }
        localStorage.removeItem('patient');
        this.router.navigateByUrl(url, { state: { parameter: patient } });
    }
}
PatientListComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-patient-list',
                template: "<ion-card *ngFor=\"let patient of patientList\" class=\"ion-no-margin ion-margin-bottom\" [ngClass]=\"{'active': patient.active,\r\n    'inactive': !patient.active}\" (click)=\"navigateTo('/patient-details', patient)\">\r\n  <ion-item lines=\"none\" id=\"patient-row\" *ngIf=\"patient.name && patient.name.length > 0\">\r\n    <ion-avatar slot=\"start\">\r\n      <div incMonoAvatar [name]=\"patient.name[0].text\"></div>\r\n    </ion-avatar>\r\n    <ion-label>\r\n      <h2 *ngIf=\"patient.name && patient.name.length > 0\">\r\n        {{patient.name[0].text}}\r\n      </h2>\r\n      <p *ngIf=\"patient.identifier && patient.identifier.length > 0\">\r\n        {{patient.identifier[0].value}}\r\n      </p>\r\n    </ion-label>\r\n    <ion-buttons>\r\n      <button id=\"patient-menu-button\" mat-button [matMenuTriggerFor]=\"menu\" (click)=\"stopProp($event)\">\r\n        <ion-icon slot=\"icon-only\" name=\"more\"></ion-icon>\r\n      </button>\r\n    </ion-buttons>\r\n    <mat-menu #menu=\"matMenu\" xPosition=\"before\">\r\n      <button id=\"patient-menu-view-button\" class=\"menuItem\" mat-menu-item\r\n        (click)=\"navigateTo('/patient-details', patient)\">{{'VIEW' | translate}}</button>\r\n      <button id=\"patient-menu-edit-button\" class=\"menuItem\" mat-menu-item\r\n        (click)=\"navigateTo('/patient-add', patient)\">{{'EDIT' | translate}}</button>\r\n    </mat-menu>\r\n  </ion-item>\r\n</ion-card>",
                styles: [".active{border-left:8px solid var(--ion-color-success)}.inactive{border-left:8px solid var(--ion-color-danger)}ion-card{cursor:pointer}"]
            }] }
];
/** @nocollapse */
PatientListComponent.ctorParameters = () => [
    { type: Router }
];
PatientListComponent.propDecorators = {
    patientList: [{ type: Input }]
};
if (false) {
    /** @type {?} */
    PatientListComponent.prototype.patientList;
    /**
     * @type {?}
     * @private
     */
    PatientListComponent.prototype.router;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aWVudC1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvZmhpci9wYXRpZW50L2xpc3QvcGF0aWVudC1saXN0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQU96QyxNQUFNLE9BQU8sb0JBQW9COzs7O0lBSS9CLFlBQW9CLE1BQWM7UUFBZCxXQUFNLEdBQU4sTUFBTSxDQUFRO0lBQUksQ0FBQzs7OztJQUV2QyxRQUFRLEtBQUssQ0FBQzs7Ozs7SUFFZCxRQUFRLENBQUMsS0FBWTtRQUNuQixLQUFLLENBQUMsZUFBZSxFQUFFLENBQUM7SUFDMUIsQ0FBQzs7Ozs7OztJQUVELFVBQVUsQ0FBQyxHQUFXLEVBQUUsT0FBWSxFQUFFLEtBQWE7UUFD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