import{D as p,E as y,P as m,Q as S}from"./chunk-FYLDFXYJ.js";import{b as s,c as v}from"./chunk-IOINCEV4.js";import{Gd as u,T as o,d as n,ma as l,na as h,sa as a,xa as r}from"./chunk-JSJB5BKT.js";import{e as f}from"./chunk-SZAW6ZBW.js";var k,j=f(()=>{h();l();u();y();v();S();k=(()=>{class i{constructor(t,e,c){this.confirmationService=t,this.translatorService=e,this.currentUser=c}canDeactivate(t){return t.isDirty&&this.currentUser.isLogged()?new n(e=>{this.confirmationService.confirm({key:"confirm-leave-route-dialog",message:this.translatorService.translate("lblSaveChanges"),accept:()=>this.processReturnType(t.validateChange(),e),reject:()=>this.processReturnType(t.rejectChange(),e),cancel:()=>this.processReturnType(t.cancelChange(),e)})}):!0}processReturnType(t,e){if(t instanceof n){t.pipe(o(1)).subscribe(c=>{e.next(c),e.complete()});return}e.next(t),e.complete()}static{this.\u0275fac=function(e){return new(e||i)(r(p),r(s),r(m))}}static{this.\u0275prov=a({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});export{k as a,j as b};
