/**
 * @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';
var PatientListComponent = /** @class */ (function () {
    function PatientListComponent(router) {
        this.router = router;
    }
    /**
     * @return {?}
     */
    PatientListComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () { };
    /**
     * @param {?} event
     * @return {?}
     */
    PatientListComponent.prototype.stopProp = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.stopPropagation();
    };
    /**
     * @param {?} url
     * @param {?} patient
     * @param {?=} event
     * @return {?}
     */
    PatientListComponent.prototype.navigateTo = /**
     * @param {?} url
     * @param {?} patient
     * @param {?=} event
     * @return {?}
     */
    function (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 = function () { return [
        { type: Router }
    ]; };
    PatientListComponent.propDecorators = {
        patientList: [{ type: Input }]
    };
    return PatientListComponent;
}());
export { PatientListComponent };
if (false) {
    /** @type {?} */
    PatientListComponent.prototype.patientList;
    /**
     * @type {?}
     * @private
     */
    PatientListComponent.prototype.router;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aWVudC1saXN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvZmhpci9wYXRpZW50L2xpc3QvcGF0aWVudC1saXN0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQVUsS0FBSyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRXpELE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUV6QztJQVNFLDhCQUFvQixNQUFjO1FBQWQsV0FBTSxHQUFOLE1BQU0sQ0FBUTtJQUFJLENBQUM7Ozs7SUFFdkMsdUNBQVE7OztJQUFSLGNBQWEsQ0FBQzs7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