(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{ppPl:function(t,s,e){"use strict";e.r(s);var o=e("ofXK"),i=e("3Pt+"),r=e("tyNb"),c=e("mrSG"),n=e("Usal"),a=e("pz8m"),h=e("7NWl"),d=e("zwrK"),b=e("5zJ1"),l=e("ReVU"),u=e("fXoL"),m=e("nD3/"),f=e("LEd3"),p=e("RDfn"),w=e("+kG/");function S(t,s){1&t&&u.Nb(0,"app-loader")}function g(t,s){if(1&t){const t=u.Tb();u.Sb(0,"dynamic-modal-form",8),u.ec("OnSubmit",(function(s){return u.xc(t),u.gc().SubmitForm(s)})),u.Rb()}if(2&t){const t=u.gc();u.nc("controls",t.controls)("showLoader",t.showLoader)("showCancel",!1)("showModal",!1)("submitText",t.submitText)}}let v=(()=>{class t{constructor(t,s,e,o,i,r,c,n){this.settingService=t,this.dataService=s,this.coreService=e,this.coreActions=o,this.actions=i,this.formService=r,this.router=c,this.cookieService=n,this.controls=[],this.showLoader=!0,this.submitText="Save Changes",this.User={}}ngOnInit(){this.auth$.subscribe(t=>{this.User=t.User,this.initializeControls(t.User),this.showLoader=!1})}initializeControls(t){this.controls=this.formService.getControls(t,3,!1)}SubmitForm(t){this.User.password=t.password,this.User.email=t.email,this.User.viewType=3,this.showLoader=!0,this.User.isadmin=!1,this.dataService.AddRecord(this.User).subscribe(t=>{"error"===t.status?this.coreActions.Notify({title:t.message,text:"",css:"bg-danger"}):(this.coreActions.Notify({title:"Email change request submitted successfully",text:"",css:"bg-success"}),this.router.navigate(["/"])),this.showLoader=!1},t=>{this.showLoader=!1,this.coreActions.Notify({title:"Error Occured",text:"",css:"bg-danger"})})}}return t.\u0275fac=function(s){return new(s||t)(u.Mb(d.a),u.Mb(h.a),u.Mb(m.a),u.Mb(f.a),u.Mb(b.a),u.Mb(a.a),u.Mb(r.c),u.Mb(l.a))},t.\u0275cmp=u.Gb({type:t,selectors:[["app-emailoptions"]],features:[u.yb([h.a,d.a,b.a,a.a,l.a])],decls:9,vars:2,consts:[[1,"row"],[1,"col-md-12"],[1,"card"],[1,"card-header"],[1,"m-b-0"],[1,"card-body"],[4,"ngIf"],[3,"controls","showLoader","showCancel","showModal","submitText","OnSubmit",4,"ngIf"],[3,"controls","showLoader","showCancel","showModal","submitText","OnSubmit"]],template:function(t,s){1&t&&(u.Sb(0,"div",0),u.Sb(1,"div",1),u.Sb(2,"div",2),u.Sb(3,"div",3),u.Sb(4,"h4",4),u.Gc(5,"Change Email"),u.Rb(),u.Rb(),u.Sb(6,"div",5),u.Ec(7,S,1,0,"app-loader",6),u.Ec(8,g,1,5,"dynamic-modal-form",7),u.Rb(),u.Rb(),u.Rb(),u.Rb()),2&t&&(u.zb(7),u.nc("ngIf",s.showLoader),u.zb(1),u.nc("ngIf",!s.showLoader&&s.controls.length>0))},directives:[o.n,p.a,w.a],encapsulation:2}),Object(c.a)([Object(n.e)(["users","auth"])],t.prototype,"auth$",void 0),t})();var y=e("o+qO"),M=e("/4iV");e.d(s,"EmailOptionModule",(function(){return L}));const E=[{path:"",data:{title:"My Account",topmenuIndex:M.c.TOPMENU_SETTINGS_INDEX,leftmenuIndex:M.c.SETTINGS_EMAIL_OPTIONS_INDEX,urls:[{title:"My Account",url:"/"},{title:"Email Options"}]},component:v}];let L=(()=>{class t{}return t.\u0275mod=u.Kb({type:t}),t.\u0275inj=u.Jb({factory:function(s){return new(s||t)},imports:[[i.i,o.c,y.a,r.f.forChild(E)]]}),t})()}}]);