/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/practitioner/list/practitioner-list.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Router } from '@angular/router';
export class PractitionerListComponent {
    /**
     * @param {?} router
     */
    constructor(router) {
        this.router = router;
        this.removePractitioner = new EventEmitter();
    }
    /**
     * @param {?} event
     * @return {?}
     */
    stopProp(event) {
        event.stopPropagation();
    }
    /**
     * @param {?} url
     * @param {?} practitioner
     * @param {?=} event
     * @return {?}
     */
    navigateTo(url, practitioner, event) {
        if (event) {
            event.stopPropagation();
        }
        localStorage.removeItem('practitioner');
        this.router.navigateByUrl(url, { state: { parameter: practitioner } });
    }
    /**
     * @param {?} practitioner
     * @return {?}
     */
    removeFromGroup(practitioner) {
        this.removePractitioner.emit(practitioner);
    }
}
PractitionerListComponent.decorators = [
    { type: Component, args: [{
                selector: 'inc-practitioner-list',
                template: "<ion-card *ngFor=\"let practitioner of practitionerList\" class=\"ion-no-margin ion-margin-bottom\" [ngClass]=\"{'active': practitioner.active,\r\n    'inactive': !practitioner.active}\" (click)=\"navigateTo('/practitioner-details', practitioner)\">\r\n  <ion-item lines=\"none\" id=\"practitioner-row\">\r\n    <ion-avatar slot=\"start\" *ngIf=\"practitioner.name && practitioner.name.length > 0\">\r\n      <div incMonoAvatar [name]=\"practitioner.name[0].family + ' ' + practitioner.name[0].given[0]\"></div>\r\n    </ion-avatar>\r\n    <ion-label>\r\n      <h2>\r\n        <span *ngIf=\"practitioner.name && practitioner.name.length > 0;else templateEmail\">\r\n          {{practitioner.name[0].text}}</span>\r\n        <ng-template #templateEmail>{{practitioner.identifier[0].value}}</ng-template>\r\n      </h2>\r\n    </ion-label>\r\n    <ion-buttons>\r\n      <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 mat-menu-item (click)=\"removeFromGroup(practitioner)\" disabled>{{'REMOVE_PRACTITIONER' |\r\n        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 */
PractitionerListComponent.ctorParameters = () => [
    { type: Router }
];
PractitionerListComponent.propDecorators = {
    practitionerList: [{ type: Input }],
    group: [{ type: Input }],
    removePractitioner: [{ type: Output }]
};
if (false) {
    /** @type {?} */
    PractitionerListComponent.prototype.practitionerList;
    /** @type {?} */
    PractitionerListComponent.prototype.group;
    /** @type {?} */
    PractitionerListComponent.prototype.removePractitioner;
    /**
     * @type {?}
     * @private
     */
    PractitionerListComponent.prototype.router;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJhY3RpdGlvbmVyLWxpc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9maGlyL3ByYWN0aXRpb25lci9saXN0L3ByYWN0aXRpb25lci1saXN0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFdkUsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBT3pDLE1BQU0sT0FBTyx5QkFBeUI7Ozs7SUFLcEMsWUFBb0IsTUFBYztRQUFkLFdBQU0sR0FBTixNQUFNLENBQVE7UUFGeEIsdUJBQWtCLEdBQWdDLElBQUksWU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