/**
 * @fileoverview added by tsickle
 * Generated from: lib/fhir/patient/details/components/patient-base/patient-base.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';
import { Router } from '@angular/router';
var PatientBaseComponent = /** @class */ (function (_super) {
    tslib_1.__extends(PatientBaseComponent, _super);
    function PatientBaseComponent(router) {
        var _this = _super.call(this) || this;
        _this.router = router;
        _this.expanded = false;
        _this.showMore = false;
        _this.devices = [];
        return _this;
    }
    /**
     * @param {?} url
     * @param {?} type
     * @param {?} object
     * @param {?=} event
     * @return {?}
     */
    PatientBaseComponent.prototype.navTo = /**
     * @param {?} url
     * @param {?} type
     * @param {?} object
     * @param {?=} event
     * @return {?}
     */
    function (url, type, object, event) {
        if (event) {
            event.stopPropagation();
        }
        if (type === 'device') {
            localStorage.removeItem('device');
        }
        this.router.navigateByUrl(url, { state: { parameter: object } });
    };
    PatientBaseComponent.decorators = [
        { type: Component, args: [{
                    selector: 'inc-patient-base',
                    template: "<mat-accordion *ngIf=\"inData\" multi=\"true\">\r\n  <mat-expansion-panel [expanded]=\"expanded\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title style=\"display: flex;\">\r\n        <ion-text>\r\n          <h4> <b style=\"color: var(--ion-color-primary)\">{{ inData.name[0].text }}</b> &nbsp;\r\n            {{ inData.identifier[0].value }} </h4>\r\n        </ion-text>\r\n        <ion-button class=\"editBtn\" fill=\"outline\" color=\"primary\" (click)=\"navTo('/patient-add', 'patient', inData, $event)\">\r\n          SZERKESZT\u00C9S\r\n        </ion-button>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-grid class=\" ion-no-padding\">\r\n      <ion-row>\r\n        <ion-col size=\"12\" size-md=\"4\">\r\n          <ion-label id=\"patient-ssn\">\r\n            <p>{{'TAJ' | translate}}</p>\r\n            <h2><b>{{ inData.identifier[0].value }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n        <ion-col size=\"12\" size-md=\"4\">\r\n          <ion-label id=\"patient-gender\">\r\n            <p>{{'GENDER' | translate}}</p>\r\n            <h2><b>{{ inData && inData.gender || '' | translate }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n        <ion-col size=\"12\" size-md=\"4\" *ngIf=\"!showMore\">\r\n          <ion-label>\r\n            <p>{{'BIRTH_DATE' | translate}}</p>\r\n            <h2><b>{{ inData && inData.birthDate || '' | date }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n      </ion-row>\r\n      <ion-row *ngIf=\"showMore\">\r\n        <ion-col size=\"12\" size-md=\"4\">\r\n          <ion-label id=\"patient-birthdate\">\r\n            <p>{{'BIRTH_DATE' | translate}}</p>\r\n            <h2><b>{{ inData && inData.birthDate || '' | date }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n        <ion-col size=\"12\" size-md=\"4\">\r\n          <ion-label id=\"patient-birthplace\">\r\n            <p>{{'PLACE_OF_BIRTH' | translate}}</p>\r\n            <h2 *ngIf=\"inData.extension && inData.extension[1]\"><b>{{ inData.extension[1].valueString }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n        <ion-col size=\"12\" size-md=\"4\">\r\n          <ion-label id=\"patient-mothers-name\">\r\n            <p>{{'MOTHER' | translate}}</p>\r\n            <h2 *ngIf=\"inData.extension && inData.extension[0]\"><b>{{ inData.extension[0].valueString }}</b></h2>\r\n          </ion-label>\r\n        </ion-col>\r\n      </ion-row>\r\n    </ion-grid>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel [expanded]=\"expanded\" *ngIf=\"showMore && inData.name && inData.name.length > 0\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-label>\r\n          <p>{{ 'NAME' | translate}}</p>\r\n        </ion-label>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-chip id=\"patient-full-name\" color=\"dark\" outline=\"true\" *ngFor=\"let name of inData.name; let i = index\">\r\n      <ion-label color=\"primary\" *ngIf=\"i === 0\"><b>{{name.text}}</b></ion-label>\r\n      <ion-label *ngIf=\"i !== 0\">{{name.text}}</ion-label>\r\n    </ion-chip>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel [expanded]=\"expanded\" *ngIf=\"showMore && inData.address && inData.address.length > 0\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-label>\r\n          <p>{{ 'ADDRESS' | translate}}</p>\r\n        </ion-label>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-text id=\"patient-full-address\" *ngFor=\"let address of inData.address\">\r\n      <p><b>{{address | address}}</b></p>\r\n    </ion-text>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel [expanded]=\"expanded\" *ngIf=\"showMore && inData.telecom && inData.telecom.length > 0\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-label>\r\n          <p>{{ 'AVAILABILITY' | translate}}</p>\r\n        </ion-label>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-text id=\"patient-telecom\" *ngFor=\"let telecom of inData.telecom\">\r\n      <p><b>{{telecom.value}}</b></p>\r\n    </ion-text>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel [expanded]=\"expanded\" *ngIf=\"showMore && inData.contact && inData.contact.length > 0\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-label>\r\n          <p>{{ 'CONTACT_PERSON' | translate}}</p>\r\n        </ion-label>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-list lines=\"none\">\r\n      <ion-item id=\"patient-contact\" *ngFor=\"let contact of inData.contact\">\r\n        <ion-avatar slot=\"start\">\r\n          <div incMonoAvatar [name]=\"contact.name.text\"></div>\r\n        </ion-avatar>\r\n        <ion-label>\r\n          <h2>{{contact.name.text}}</h2>\r\n          <h3 *ngIf=\"contact.telecom[0].value\">{{contact.telecom[0].value}}</h3>\r\n          <p *ngIf=\"contact.telecom[1].value\">{{contact.telecom[1].value}}</p>\r\n        </ion-label>\r\n      </ion-item>\r\n    </ion-list>\r\n  </mat-expansion-panel>\r\n  <mat-expansion-panel [expanded]=\"expanded\" *ngIf=\"devices.length\">\r\n    <mat-expansion-panel-header>\r\n      <mat-panel-title>\r\n        <ion-label>\r\n          <p>{{ 'OWN_DEVICES' | translate}}</p>\r\n        </ion-label>\r\n      </mat-panel-title>\r\n    </mat-expansion-panel-header>\r\n    <ion-chip id=\"patient-full-name\" color=\"dark\" outline=\"true\" *ngFor=\"let device of devices; let i = index\">\r\n      <ion-label color=\"primary\" (click)=\"navTo('/device-details', 'device', device)\"><b>{{device.modelNumber}}</b>\r\n      </ion-label>\r\n    </ion-chip>\r\n  </mat-expansion-panel>\r\n</mat-accordion>",
                    styles: [".editBtn{margin:auto 16px auto auto}"]
                }] }
    ];
    /** @nocollapse */
    PatientBaseComponent.ctorParameters = function () { return [
        { type: Router }
    ]; };
    PatientBaseComponent.propDecorators = {
        expanded: [{ type: Input }],
        showMore: [{ type: Input }],
        devices: [{ type: Input }]
    };
    return PatientBaseComponent;
}(AbstractDetailsComponent));
export { PatientBaseComponent };
if (false) {
    /** @type {?} */
    PatientBaseComponent.prototype.expanded;
    /** @type {?} */
    PatientBaseComponent.prototype.showMore;
    /** @type {?} */
    PatientBaseComponent.prototype.devices;
    /**
     * @type {?}
     * @private
     */
    PatientBaseComponent.prototype.router;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGF0aWVudC1iYXNlLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvZmhpci9wYXRpZW50L2RldGFpbHMvY29tcG9uZW50cy9wYXR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