function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var o=0;o<t.length;o++){var i=t[o];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _createClass(e,t,o){return t&&_defineProperties(e.prototype,t),o&&_defineProperties(e,o),e}(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{ppPl:function(e,t,o){"use strict";o.r(t);var i=o("ofXK"),s=o("3Pt+"),n=o("tyNb"),r=o("mrSG"),a=o("Usal"),c=o("pz8m"),l=o("7NWl"),u=o("zwrK"),b=o("5zJ1"),d=o("ReVU"),h=o("fXoL"),f=o("nD3/"),m=o("LEd3"),p=o("RDfn"),w=o("+kG/");function v(e,t){1&e&&h.Nb(0,"app-loader")}function S(e,t){if(1&e){var o=h.Tb();h.Sb(0,"dynamic-modal-form",8),h.ec("OnSubmit",(function(e){return h.xc(o),h.gc().SubmitForm(e)})),h.Rb()}if(2&e){var i=h.gc();h.nc("controls",i.controls)("showLoader",i.showLoader)("showCancel",!1)("showModal",!1)("submitText",i.submitText)}}var y,g=((y=function(){function e(t,o,i,s,n,r,a,c){_classCallCheck(this,e),this.settingService=t,this.dataService=o,this.coreService=i,this.coreActions=s,this.actions=n,this.formService=r,this.router=a,this.cookieService=c,this.controls=[],this.showLoader=!0,this.submitText="Save Changes",this.User={}}return _createClass(e,[{key:"ngOnInit",value:function(){var e=this;this.auth$.subscribe((function(t){e.User=t.User,e.initializeControls(t.User),e.showLoader=!1}))}},{key:"initializeControls",value:function(e){this.controls=this.formService.getControls(e,3,!1)}},{key:"SubmitForm",value:function(e){var t=this;this.User.password=e.password,this.User.email=e.email,this.User.viewType=3,this.showLoader=!0,this.User.isadmin=!1,this.dataService.AddRecord(this.User).subscribe((function(e){"error"===e.status?t.coreActions.Notify({title:e.message,text:"",css:"bg-danger"}):(t.coreActions.Notify({title:"Email change request submitted successfully",text:"",css:"bg-success"}),t.router.navigate(["/"])),t.showLoader=!1}),(function(e){t.showLoader=!1,t.coreActions.Notify({title:"Error Occured",text:"",css:"bg-danger"})}))}}]),e}()).\u0275fac=function(e){return new(e||y)(h.Mb(u.a),h.Mb(l.a),h.Mb(f.a),h.Mb(m.a),h.Mb(b.a),h.Mb(c.a),h.Mb(n.c),h.Mb(d.a))},y.\u0275cmp=h.Gb({type:y,selectors:[["app-emailoptions"]],features:[h.yb([l.a,u.a,b.a,c.a,d.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(e,t){1&e&&(h.Sb(0,"div",0),h.Sb(1,"div",1),h.Sb(2,"div",2),h.Sb(3,"div",3),h.Sb(4,"h4",4),h.Gc(5,"Change Email"),h.Rb(),h.Rb(),h.Sb(6,"div",5),h.Ec(7,v,1,0,"app-loader",6),h.Ec(8,S,1,5,"dynamic-modal-form",7),h.Rb(),h.Rb(),h.Rb(),h.Rb()),2&e&&(h.zb(7),h.nc("ngIf",t.showLoader),h.zb(1),h.nc("ngIf",!t.showLoader&&t.controls.length>0))},directives:[i.n,p.a,w.a],encapsulation:2}),Object(r.a)([Object(a.e)(["users","auth"])],y.prototype,"auth$",void 0),y),C=o("o+qO"),M=o("/4iV");o.d(t,"EmailOptionModule",(function(){return O}));var E,L=[{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:g}],O=((E=function e(){_classCallCheck(this,e)}).\u0275mod=h.Kb({type:E}),E.\u0275inj=h.Jb({factory:function(e){return new(e||E)},imports:[[s.i,i.c,C.a,n.f.forChild(L)]]}),E)}}]);