import { Component } from '@angular/core';
import { EmailStatusEnum } from '../../../enums/EmailStatusEnum';
import * as i0 from "@angular/core";
import * as i1 from "@ionic/angular";
import * as i2 from "../../../services/login/login.service";
import * as i3 from "../../../services/util/util.service";
import * as i4 from "@angular/common";
import * as i5 from "primeng/tooltip";
function MyProfilePage_ion_label_19_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "ion-label", 2);
    i0.ɵɵtext(1);
    i0.ɵɵelementEnd();
} if (rf & 2) {
    const ctx_r0 = i0.ɵɵnextContext();
    i0.ɵɵadvance(1);
    i0.ɵɵtextInterpolate(ctx_r0.ls.getUser().middleName);
} }
function MyProfilePage_ion_label_20_Template(rf, ctx) { if (rf & 1) {
    i0.ɵɵelementStart(0, "ion-label", 2);
    i0.ɵɵtext(1, "--");
    i0.ɵɵelementEnd();
} }
export class MyProfilePage {
    constructor(popup, ls, util, navParams, nav) {
        this.popup = popup;
        this.ls = ls;
        this.util = util;
        this.navParams = navParams;
        this.nav = nav;
        this.statusEnum = EmailStatusEnum;
    }
    ngOnInit() {
    }
    close() {
        this.popup.dismiss(null);
    }
    logout() {
        if (this.util.getContextRoot() === '/audit') {
            this.util.openPageByContextRoot('/audit', "landing", this.nav);
        }
        else if (this.ls.isCsr()) {
            this.util.openPageByContextRoot(this.util.getSecurityAppContextRoot(), "landing", this.nav);
        }
        else {
            this.nav.navigateRoot('/landing');
        }
        this.ls.logout();
        this.popup.dismiss(null);
    }
    static { this.ɵfac = function MyProfilePage_Factory(t) { return new (t || MyProfilePage)(i0.ɵɵdirectiveInject(i1.PopoverController), i0.ɵɵdirectiveInject(i2.LoginService), i0.ɵɵdirectiveInject(i3.UtilService), i0.ɵɵdirectiveInject(i1.NavParams), i0.ɵɵdirectiveInject(i1.NavController)); }; }
    static { this.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MyProfilePage, selectors: [["app-my-profile"]], decls: 60, vars: 8, consts: [[2, "margin", "0px"], [1, "ion-padding", 2, "font-size", "large"], ["color", "dark"], [1, "ion-padding", "app-box"], ["color", "dark", 4, "ngIf"], ["pTooltip", "Logout", "tooltipPosition", "bottom", "size", "small", "fill", "outline", "shape", "round", 3, "click"], ["slot", "start", "name", "log-out-sharp"]], template: function MyProfilePage_Template(rf, ctx) { if (rf & 1) {
            i0.ɵɵelementStart(0, "ion-content")(1, "ion-card", 0)(2, "ion-card-header", 1)(3, "ion-label", 2);
            i0.ɵɵtext(4, "My Profile");
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(5, "ion-card-content");
            i0.ɵɵelement(6, "br");
            i0.ɵɵelementStart(7, "div", 3)(8, "ion-row")(9, "ion-col")(10, "ion-label");
            i0.ɵɵtext(11, "First Name");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(12, "br");
            i0.ɵɵelementStart(13, "ion-label", 2);
            i0.ɵɵtext(14);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(15, "ion-col")(16, "ion-label");
            i0.ɵɵtext(17, "Middle Name");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(18, "br");
            i0.ɵɵtemplate(19, MyProfilePage_ion_label_19_Template, 2, 1, "ion-label", 4)(20, MyProfilePage_ion_label_20_Template, 2, 0, "ion-label", 4);
            i0.ɵɵelementEnd();
            i0.ɵɵelementStart(21, "ion-col")(22, "ion-label");
            i0.ɵɵtext(23, "Last Name");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(24, "br");
            i0.ɵɵelementStart(25, "ion-label", 2);
            i0.ɵɵtext(26);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelement(27, "br");
            i0.ɵɵelementStart(28, "ion-row")(29, "ion-col")(30, "ion-label");
            i0.ɵɵtext(31, "User ID");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(32, "br");
            i0.ɵɵelementStart(33, "ion-label", 2);
            i0.ɵɵtext(34);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(35, "ion-col")(36, "ion-label");
            i0.ɵɵtext(37, "Email");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(38, "br");
            i0.ɵɵelementStart(39, "ion-label", 2);
            i0.ɵɵtext(40);
            i0.ɵɵelementEnd()();
            i0.ɵɵelementStart(41, "ion-col")(42, "ion-label");
            i0.ɵɵtext(43, "Email Status");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(44, "br");
            i0.ɵɵelementStart(45, "ion-label", 2);
            i0.ɵɵtext(46);
            i0.ɵɵelementEnd()()();
            i0.ɵɵelement(47, "br");
            i0.ɵɵelementStart(48, "ion-row")(49, "ion-col")(50, "ion-label");
            i0.ɵɵtext(51, "Password Expiration Date");
            i0.ɵɵelementEnd();
            i0.ɵɵelement(52, "br");
            i0.ɵɵelementStart(53, "ion-label", 2);
            i0.ɵɵtext(54);
            i0.ɵɵelementEnd()();
            i0.ɵɵelement(55, "ion-col");
            i0.ɵɵelementStart(56, "ion-col")(57, "ion-button", 5);
            i0.ɵɵlistener("click", function MyProfilePage_Template_ion_button_click_57_listener() { return ctx.logout(); });
            i0.ɵɵelement(58, "ion-icon", 6);
            i0.ɵɵtext(59, " Logout ");
            i0.ɵɵelementEnd()()()()()()();
        } if (rf & 2) {
            i0.ɵɵadvance(14);
            i0.ɵɵtextInterpolate(ctx.ls.getUser().firstName);
            i0.ɵɵadvance(5);
            i0.ɵɵproperty("ngIf", ctx.ls.getUser().middleName);
            i0.ɵɵadvance(1);
            i0.ɵɵproperty("ngIf", !ctx.ls.getUser().middleName);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.ls.getUser().lastName);
            i0.ɵɵadvance(8);
            i0.ɵɵtextInterpolate(ctx.ls.getUser().username);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.ls.getUser().emailId);
            i0.ɵɵadvance(6);
            i0.ɵɵtextInterpolate(ctx.statusEnum[ctx.ls.getUser().emailStatus]);
            i0.ɵɵadvance(8);
            i0.ɵɵtextInterpolate(ctx.util.getDateInMMDDYYYYFormat(ctx.util.getEnteredDate(ctx.ls.getUser().passwordExpirationDate)));
        } }, dependencies: [i1.IonButton, i1.IonCard, i1.IonCardContent, i1.IonCardHeader, i1.IonCol, i1.IonContent, i1.IonIcon, i1.IonLabel, i1.IonRow, i4.NgIf, i5.Tooltip] }); }
}
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MyProfilePage, [{
        type: Component,
        args: [{ selector: 'app-my-profile', template: "<ion-content>\r\n\r\n  <ion-card style=\"margin: 0px;\">\r\n    <ion-card-header class=\"ion-padding\" style=\"font-size:large\">\r\n     <ion-label color=\"dark\">My Profile</ion-label>\r\n    </ion-card-header>\r\n    <ion-card-content>\r\n      <br/>\r\n      <div class=\"ion-padding app-box\">\r\n          <ion-row>\r\n            <ion-col>\r\n              <ion-label>First Name</ion-label><br/>\r\n              <ion-label color=\"dark\">{{ls.getUser().firstName}}</ion-label>\r\n            </ion-col>\r\n            <ion-col>\r\n              <ion-label>Middle Name</ion-label><br/>\r\n              <ion-label color=\"dark\" *ngIf=\"ls.getUser().middleName\">{{ls.getUser().middleName}}</ion-label>\r\n              <ion-label color=\"dark\" *ngIf=\"!ls.getUser().middleName\">--</ion-label>\r\n            </ion-col>\r\n            <ion-col>\r\n              <ion-label>Last Name</ion-label><br/>\r\n              <ion-label color=\"dark\">{{ls.getUser().lastName}}</ion-label>\r\n            </ion-col>\r\n          </ion-row>\r\n          <br/>\r\n          <ion-row>\r\n            <ion-col>\r\n              <ion-label>User ID</ion-label><br/>\r\n              <ion-label color=\"dark\">{{ls.getUser().username}}</ion-label>\r\n            </ion-col>\r\n            <ion-col>\r\n              <ion-label>Email</ion-label><br/>\r\n              <ion-label color=\"dark\">{{ls.getUser().emailId}}</ion-label>\r\n            </ion-col>\r\n            <ion-col>\r\n              <ion-label>Email Status</ion-label><br/>\r\n              <ion-label color=\"dark\">{{statusEnum[ls.getUser().emailStatus]}}</ion-label>\r\n            </ion-col>\r\n          </ion-row>\r\n          <br/>\r\n          <ion-row>\r\n            <ion-col>\r\n              <ion-label>Password Expiration Date</ion-label><br/>\r\n              <ion-label color=\"dark\">{{util.getDateInMMDDYYYYFormat(util.getEnteredDate(ls.getUser().passwordExpirationDate))}}</ion-label>\r\n            </ion-col>\r\n            <ion-col>\r\n            </ion-col>\r\n            <ion-col>\r\n              <ion-button (click)=\"logout()\" pTooltip=\"Logout\" tooltipPosition=\"bottom\" size=\"small\" fill=\"outline\" shape=\"round\">\r\n                <ion-icon slot=\"start\" name=\"log-out-sharp\"></ion-icon>\r\n                Logout\r\n              </ion-button>\r\n            </ion-col>\r\n          </ion-row>\r\n      </div>\r\n    </ion-card-content>\r\n  </ion-card>\r\n  \r\n</ion-content>\r\n" }]
    }], () => [{ type: i1.PopoverController }, { type: i2.LoginService }, { type: i3.UtilService }, { type: i1.NavParams }, { type: i1.NavController }], null); })();
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MyProfilePage, { className: "MyProfilePage", filePath: "lib\\pages\\popovers\\my-profile\\my-profile.page.ts", lineNumber: 12 }); })();
//# sourceMappingURL=data:application/json;base64, 