/**
 * @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';
var PractitionerListComponent = /** @class */ (function () {
    function PractitionerListComponent(router) {
        this.router = router;
        this.removePractitioner = new EventEmitter();
    }
    /**
     * @param {?} event
     * @return {?}
     */
    PractitionerListComponent.prototype.stopProp = /**
     * @param {?} event
     * @return {?}
     */
    function (event) {
        event.stopPropagation();
    };
    /**
     * @param {?} url
     * @param {?} practitioner
     * @param {?=} event
     * @return {?}
     */
    PractitionerListComponent.prototype.navigateTo = /**
     * @param {?} url
     * @param {?} practitioner
     * @param {?=} event
     * @return {?}
     */
    function (url, practitioner, event) {
        if (event) {
            event.stopPropagation();
        }
        localStorage.removeItem('practitioner');
        this.router.navigateByUrl(url, { state: { parameter: practitioner } });
    };
    /**
     * @param {?} practitioner
     * @return {?}
     */
    PractitionerListComponent.prototype.removeFromGroup = /**
     * @param {?} practitioner
     * @return {?}
     */
    function (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 = function () { return [
        { type: Router }
    ]; };
    PractitionerListComponent.propDecorators = {
        practitionerList: [{ type: Input }],
        group: [{ type: Input }],
        removePractitioner: [{ type: Output }]
    };
    return PractitionerListComponent;
}());
export { PractitionerListComponent };
if (false) {
    /** @type {?} */
    PractitionerListComponent.prototype.practitionerList;
    /** @type {?} */
    PractitionerListComponent.prototype.group;
    /** @type {?} */
    PractitionerListComponent.prototype.removePractitioner;
    /**
     * @type {?}
     * @private
     */
    PractitionerListComponent.prototype.router;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJhY3RpdGlvbmVyLWxpc3QuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGluY2xvdWRlZC9pb25pYzQtaW5jbG91ZGVkLWxpYi8iLCJzb3VyY2VzIjpbImxpYi9maGlyL3ByYWN0aXRpb25lci9saXN0L3ByYWN0aXRpb25lci1saXN0LmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxZQUFZLEVBQUUsTUFBTSxl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