(self.webpackChunkapp=self.webpackChunkapp||[]).push([[8847],{58847:(B,u,o)=>{o.r(u),o.d(u,{RemoveCompanyAssociationPageModule:()=>E});var c=o(61380),C=o(15861),O=o(24889),e=o(45449),p=o(90603),A=o(80698),g=o(99826),r=o(47898),M=o(36290),S=o(90944);const l=function(n){return{companyName:n}},P=function(){return["/account"]},f=[{path:"",component:(()=>{class n{constructor(t,i,a,d,N,T,x,b,j,L){var y=this;this.modalController=t,this.sessionAddFlowService=i,this.translateService=a,this.activatedRoute=d,this.router=N,this.apiService=T,this.loaderService=x,this.notificatorService=b,this.logService=j,this.authService=L,this.openModalConfirmRemoveAssociation=(0,C.Z)(function*(){const v=yield y.modalController.create({component:O._5,cssClass:"modal-confirm-remove-company-association"});yield v.present();const{data:_,role:m}=yield v.onDidDismiss();console.log({data:_},{role:m}),"success"===m&&(console.log("action are"),y.removeCompanyAssociation()),"cancel"===m&&console.log("action are cancel")}),this.activatedRoute.params.subscribe(v=>{const{companyInstanceName:_,companyName:m,company:V}=this.router.getCurrentNavigation()?.extras?.state;this.companyName=m,this.companyInstance=_,this.state=V})}ngOnInit(){this.sessionAddFlowService.createXKACSessionId(),console.log("RemoveCompanyAssociationPage ngOnInit")}removeCompanyAssociation(){var t=this;return(0,C.Z)(function*(){if(!t.companyInstance)return;t.sessionAddFlowService.createXKACSessionId();const i=t.companyInstance;t.loaderService.show("Removing company association..."),t.apiService.removeCompanyAssociation(i).subscribe({next:a=>{t.loaderService.hide(),t.toast({title:"TOAST_REMOVE_COMPANY_ASSOCIATION.TITLE_SUCCESS",message:"TOAST_REMOVE_COMPANY_ASSOCIATION.MESSAGE_SUCCESS",type:"success"}),console.log("RemoveCompanyAssociation - Navegando para /account com queryParams reload"),t.authService.clearAccount(),setTimeout(()=>{t.router.navigate(["/account"],{queryParams:{reload:"true"},replaceUrl:!0})},800)},error:a=>{t.loaderService.hide(),t.toast({title:"TOAST_REMOVE_COMPANY_ASSOCIATION.TITLE_ERROR",message:"TOAST_REMOVE_COMPANY_ASSOCIATION.MESSAGE_ERROR",type:"error"}),t.logService.logError("http::removeCompanyAssociation","Error removing company association",a)}})})()}toast(t){const i=this.translateService.instant(t.title),a=this.translateService.instant(t.message);this.notificatorService.notify({title:i,message:a,type:t.type})}}return n.\u0275fac=function(t){return new(t||n)(e.\u0275\u0275directiveInject(p.ModalController),e.\u0275\u0275directiveInject(A.t),e.\u0275\u0275directiveInject(g.sK),e.\u0275\u0275directiveInject(c.ActivatedRoute),e.\u0275\u0275directiveInject(c.Router),e.\u0275\u0275directiveInject(r.sM),e.\u0275\u0275directiveInject(r.D1),e.\u0275\u0275directiveInject(r.V6),e.\u0275\u0275directiveInject(r.$V),e.\u0275\u0275directiveInject(r.e8))},n.\u0275cmp=e.\u0275\u0275defineComponent({type:n,selectors:[["app-remove-company-association"]],decls:30,vars:37,consts:[["defaultHref","/account",3,"refresh","toQRCode","title"],[1,"remove-company-association"],[1,"remove-company-association__title"],[1,"remove-company-association__description"],[1,"remove-company-association__description__desc_01",3,"innerHTML"],[1,"remove-company-association__description__desc_02"],[1,"remove-company-association__end-description"],[1,"remove-company-association__btns"],[1,"remove-company-association__btns__not-delete"],["routerLinkActive","router-link-active","shape","round",1,"no_delete_btn",3,"routerLink"],[1,"remove-company-association__btns__yes-delete"],["mode","ios","color","danger","fill","clear",3,"click"]],template:function(t,i){1&t&&(e.\u0275\u0275element(0,"app-header",0),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275elementStart(2,"ion-content")(3,"div",1),e.\u0275\u0275text(4),e.\u0275\u0275pipe(5,"json"),e.\u0275\u0275elementStart(6,"div",2)(7,"h3"),e.\u0275\u0275text(8),e.\u0275\u0275pipe(9,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(10,"div",3)(11,"ul"),e.\u0275\u0275element(12,"li",4),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementStart(14,"li",5),e.\u0275\u0275text(15),e.\u0275\u0275pipe(16,"translate"),e.\u0275\u0275elementEnd()()(),e.\u0275\u0275elementStart(17,"div",6)(18,"h4"),e.\u0275\u0275text(19),e.\u0275\u0275pipe(20,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(21,"div",7)(22,"div",8)(23,"ion-button",9),e.\u0275\u0275text(24),e.\u0275\u0275pipe(25,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(26,"div",10)(27,"ion-button",11),e.\u0275\u0275listener("click",function(){return i.openModalConfirmRemoveAssociation()}),e.\u0275\u0275text(28),e.\u0275\u0275pipe(29,"translate"),e.\u0275\u0275elementEnd()()()()()),2&t&&(e.\u0275\u0275property("refresh",!1)("toQRCode",!1)("title",e.\u0275\u0275pipeBind2(1,11,"PG_REMOVE_COMPANY_ASSOCIATION.HEADER_TITLE",e.\u0275\u0275pureFunction1(30,l,i.companyName))),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(5,14,i.company)," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind2(9,16,"PG_REMOVE_COMPANY_ASSOCIATION.TITLE",e.\u0275\u0275pureFunction1(32,l,i.companyName))," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("innerHTML",e.\u0275\u0275pipeBind2(13,19,"PG_REMOVE_COMPANY_ASSOCIATION.DESC_01",e.\u0275\u0275pureFunction1(34,l,i.companyName)),e.\u0275\u0275sanitizeHtml),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(16,22,"PG_REMOVE_COMPANY_ASSOCIATION.DESC_02")," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(20,24,"PG_REMOVE_COMPANY_ASSOCIATION.DESC_03")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("routerLink",e.\u0275\u0275pureFunction0(36,P)),e.\u0275\u0275advance(1),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(25,26,"PG_REMOVE_COMPANY_ASSOCIATION.BTN_CANCEL")," "),e.\u0275\u0275advance(4),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(29,28,"PG_REMOVE_COMPANY_ASSOCIATION.BTN_CONFIRM")," "))},dependencies:[p.IonButton,p.IonContent,p.RouterLinkDelegate,M.G,c.RouterLink,c.RouterLinkActive,S.JsonPipe,g.X$],styles:["ion-content[_ngcontent-%COMP%]{--background: #efefef}.remove-company-association[_ngcontent-%COMP%]{justify-content:space-around;padding:1em 2em;display:flex;color:#383a3e;flex-direction:column;height:100%;align-items:center}.remove-company-association__title[_ngcontent-%COMP%]{text-align:center}.remove-company-association__title[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px!important;font-weight:600}.remove-company-association__description[_ngcontent-%COMP%]{line-height:25px;letter-spacing:.045em;color:#383a3e}.remove-company-association__description[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0 1em}.remove-company-association__description[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{font-weight:400;font-size:1em!important}.remove-company-association__description__desc_01[_ngcontent-%COMP%]{padding-bottom:15.5px}.remove-company-association__description__desc_02[_ngcontent-%COMP%]{padding-top:.8em;padding-bottom:1.5em}.remove-company-association__end-description[_ngcontent-%COMP%]{margin-bottom:3em;line-height:25px;display:flex;align-items:center;text-align:center;letter-spacing:.045em;color:#000}.remove-company-association__end-description[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-weight:600;font-size:1em}.remove-company-association__btns[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.remove-company-association__btns__not-delete[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%], .remove-company-association__btns__yes-delete[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:220px;height:40px;text-transform:initial}.remove-company-association__btns__not-delete[_ngcontent-%COMP%] ion-button.no_delete_btn[_ngcontent-%COMP%], .remove-company-association__btns__yes-delete[_ngcontent-%COMP%] ion-button.no_delete_btn[_ngcontent-%COMP%]{--background: #cccccc !important;--box-shadow: none !important;--color: #fff !important}.remove-company-association__btns__not-delete[_ngcontent-%COMP%]{padding-bottom:.5em}.remove-company-association__btns__yes-delete[_ngcontent-%COMP%]{margin-bottom:2em}"]}),n})()}];let h=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[c.RouterModule.forChild(f),c.RouterModule]}),n})();var I=o(15626),R=o(69270);let E=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.\u0275\u0275defineNgModule({type:n}),n.\u0275inj=e.\u0275\u0275defineInjector({imports:[R.I,I.K,h]}),n})()}}]);