1import{a as b}from"./chunk-OQHWWIZV.js";import{F as T,_ as j,ta as E}from"./chunk-XN7UA7J6.js";import{Ac as C,Gb as A,Hb as I,I as d,Ia as v,Q as f,Ua as s,Va as n,Wa as g,bb as S,dc as w,j as p,jd as M,kd as U,md as y,nb as a,pb as P,qa as m,qd as _,rd as c,ua as o,xa as u,ya as h}from"./chunk-DAOUD462.js";import"./chunk-JCJIXIGU.js";import"./chunk-ODN5LVDJ.js";var k=(()=>{class r{constructor(t,e,i,l){this.userService=t,this.authService=e,this.toastr=i,this.translate=l,this.token=localStorage.getItem("token")}ngOnInit(){this.token&&(this.userJwt=this.authService.decodeToken(this.token),this.userDetails(this.userJwt.user_id))}userDetails(t){this.userService.getUserById(t).pipe(d(e=>{let i=new c(e);return i.setProfile(e),p(i)})).subscribe(e=>{this.currentUser=e})}onUpdatedAgent(t){t.delete("id"),t.append("id",this.userJwt.user_id),this.userService.updateUserById(t).pipe(d(e=>{let i=new c(e);return i.setProfile(e),p(i)})).subscribe(e=>{this.currentUser=e,this.toastr.success(this.translate.instant("notifications.updateProfileSuccess"))},e=>{this.toastr.error(e.error.message)})}static{this.\u0275fac=function(e){return new(e||r)(o(T),o(_),o(y),o(M))}}static{this.\u0275cmp=u({type:r,selectors:[["app-profile"]],standalone:!1,decls:13,vars:4,consts:[[1,"header","bg-gradient-danger","pb-4","pt-8","pt-md-6"],[1,"container-fluid"],[1,"title-page"],[1,"card","card-header"],[1,"ni","fas","fa-home","mr-2"],[1,"mt-4","card","card-header"],[3,"updateAgent","agent"]],template:function(e,i){e&1&&(s(0,"div",0)(1,"div",1)(2,"h1",2),a(3,"Profile"),n(),s(4,"div",3)(5,"p")(6,"span"),g(7,"i",4),a(8),A(9,"translate"),n(),a(10," Profile "),n()(),s(11,"div",5)(12,"app-agent-profile",6),S("updateAgent",function(x){return i.onUpdatedAgent(x)}),n()()()()),e&2&&(m(8),P(" ",I(9,2,"dashboard.home")," - "),m(4),v("agent",i.currentUser))},dependencies:[j,U],encapsulation:2})}}return r})();var D=[{path:"",component:k,canActivate:[b],data:{role:["BROKER","AGENT"]}}],X=(()=>{class r{static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275mod=h({type:r})}static{this.\u0275inj=f({imports:[w,E,C.forChild(D)]})}}return r})();export{X as ProfileModule};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.