/**
 * @fileoverview added by tsickle
 * Generated from: lib/user/profile/components/fire-user/fire-user.component.ts
 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
 */
import { Component } from '@angular/core';
import { Router, NavigationEnd } from '@angular/router';
import { Storage } from '@ionic/storage';
var FireUserComponent = /** @class */ (function () {
    function FireUserComponent(router, storage) {
        this.router = router;
        this.storage = storage;
    }
    /**
     * @return {?}
     */
    FireUserComponent.prototype.ngOnInit = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.setEmail();
        this.router.events.subscribe((/**
         * @param {?} event
         * @return {?}
         */
        function (event) {
            if (event instanceof NavigationEnd) {
                _this.setEmail();
            }
        }));
    };
    /**
     * @param {?} dest
     * @return {?}
     */
    FireUserComponent.prototype.navTo = /**
     * @param {?} dest
     * @return {?}
     */
    function (dest) {
        this.router.navigateByUrl('' + dest);
    };
    /**
     * @return {?}
     */
    FireUserComponent.prototype.setEmail = /**
     * @return {?}
     */
    function () {
        var _this = this;
        this.storage.get('user').then((/**
         * @param {?} user
         * @return {?}
         */
        function (user) {
            if (user) {
                _this.email = user.email;
            }
        }));
    };
    FireUserComponent.decorators = [
        { type: Component, args: [{
                    selector: 'inc-fire-user',
                    template: "<ion-list lines=\"none\" class=\"ion-padding-start\">\r\n  <ion-item button id=\"emailTag\" (click)=\"navTo('ch-email')\">\r\n    <ion-label>{{'EMAIL' | translate}}</ion-label>\r\n    <ion-label *ngIf=\"email\"><b>{{email}}</b></ion-label>\r\n  </ion-item>\r\n  <ion-item button id=\"passwordTag\" (click)=\"navTo('ch-password')\">\r\n    <ion-label>{{'PASSWORD' | translate}}</ion-label>\r\n    <ion-label><b>********</b></ion-label>\r\n  </ion-item>\r\n</ion-list>",
                    styles: [""]
                }] }
    ];
    /** @nocollapse */
    FireUserComponent.ctorParameters = function () { return [
        { type: Router },
        { type: Storage }
    ]; };
    return FireUserComponent;
}());
export { FireUserComponent };
if (false) {
    /** @type {?} */
    FireUserComponent.prototype.email;
    /**
     * @type {?}
     * @private
     */
    FireUserComponent.prototype.router;
    /**
     * @type {?}
     * @private
     */
    FireUserComponent.prototype.storage;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlyZS11c2VyLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BpbmNsb3VkZWQvaW9uaWM0LWluY2xvdWRlZC1saWIvIiwic291cmNlcyI6WyJsaWIvdXNlci9wcm9maWxlL2NvbXBvbmVudHMvZmlyZS11c2VyL2ZpcmUtdXNlci5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQ2xELE9BQU8sRUFBRSxNQUFNLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEQsT0FBTyxFQUFFLE9BQU8sRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRXpDO0lBUUUsMkJBQW9CLE1BQWMsRUFBVSxPQUFnQjtRQUF4QyxXQUFNLEdBQU4sTUFBTSxDQUFRO1FBQVUsWUFBTyxHQUFQLE9BQU8sQ0FBUztJQUFJLENBQUM7Ozs7SUFFakUsb0NBQVE7OztJQUFSO1FBQUEsaUJBS0M7UUFKQyxJQUFJLENBQUMsUUFBUSxFQUFFLENBQUM7UUFDaEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsU0FBUzs7OztRQUFDLFVBQUMsS0FBSztZQUNqQyxJQUFJLEtBQUssWUFBWSxhQUFhLEVBQUU7Z0JBQUUsS0FBSSxDQUFDLFFBQVEsRUFBRSxDQUFDO2FBQUU7UUFDMUQsQ0FBQyxFQUFDLENBQUM7SUFDTCxDQUFDOzs7OztJQUVELGlDQUFLOzs7O0lBQUwsVUFBTSxJQUFZO1FBQ2hCLElBQUksQ0FBQyxNQUF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