"use strict";(self.webpackChunkwebadmin=self.webpackChunkwebadmin||[]).push([["libs_dialogs_remove-user_remove-user_component_ts"],{72576:(p,r,e)=>{e.r(r),e.d(r,{RemoveUserModalContent:()=>h});var l=e(82529),_=e(60177),c=e(60802),i=e(19689),d=e(58415),m=e(45047),v=e(40221),u=e(48233),E=e(74941),t=e(4020),M=e(39060),U=e(34875),P=e(60272);function D(a,O){if(1&a){const n=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(n);const s=t.XpG();return t.Njj(s.close())}),t.nrm(1,"div",8),t.k0s()}}let h=(()=>{class a extends v.f{constructor(n,o,s,g){super(s),this.processService=n,this.toastService=o,this.dialogData=g,this.LANG=u}ngOnInit(){const{user:n,system:o}=this.dialogData,s=n.type===E.u.cloud?"remove":"delete";this.dialogTitle=this.LANG.dialogs.titles[`${s}User`],this.dialogButtonText=this.LANG.dialogs.buttons[s],this.removeUserProcess=this.processService.createProcess(()=>(this.lock(),o.userManager.deleteUser(n)),{errorPrefix:this.LANG.errorCodes.cantSharePrefix,ignoreError:!0},()=>{o.getUsers(!0).then(()=>this.dialogRef.close(!0)),this.close(!0)},()=>{this.toastService.notify(this.LANG.dialogs.updateSession.removeUser,m.C.Warning),this.unlock()})}static{this.\u0275fac=function(o){return new(o||a)(t.rXU(M.z),t.rXU(U.z),t.rXU(l.ce),t.rXU(l.Qs))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["nx-modal-remove-user-content"]],features:[t.Vt3],decls:10,vars:12,consts:[["data-testid","removeUserModal"],[1,"modal-header"],[1,"modal-title"],["type","button","class","close","data-dismiss","modal","aria-label","Close",3,"click",4,"ngIf"],[1,"modal-footer"],["data-testid","removeUserBtn",3,"process","actionType","buttonText"],["data-testid","closeRemoveUserModalBtn",3,"process","cancelFn","discardFn"],["type","button","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],[1,"close-content"]],template:function(o,s){1&o&&(t.j41(0,"div",0)(1,"div",1)(2,"h1",2),t.EFF(3),t.nI1(4,"translate"),t.k0s(),t.DNE(5,D,2,0,"button",3),t.k0s(),t.j41(6,"div",4),t.nrm(7,"nx-process-button",5),t.nI1(8,"translate"),t.nrm(9,"nx-cancel-button",6),t.k0s()()),2&o&&(t.R7$(3),t.JRh(t.bMT(4,8,s.dialogTitle)),t.R7$(2),t.Y8G("ngIf",s.closable),t.R7$(2),t.Y8G("process",s.removeUserProcess)("actionType","danger")("buttonText",t.bMT(8,10,s.dialogButtonText)),t.R7$(2),t.Y8G("process",s.removeUserProcess)("cancelFn",s.unlock)("discardFn",s.close))},dependencies:[_.MD,_.bT,c.h,P.D,i.f,d.N],encapsulation:2})}}return a})()}}]);