"use strict";(self.webpackChunkwebadmin=self.webpackChunkwebadmin||[]).push([["libs_dialogs_apply_apply_component_ts"],{53272:(D,o,a)=>{a.r(o),a.d(o,{ApplyModalContent:()=>b});var c=a(82529),i=a(60177),p=a(60802),d=a(19689),_=a(58415),r=a(19128),t=a(4020),u=a(64147),h=a(60272);function y(l,E){if(1&l){const e=t.RV6();t.j41(0,"button",8),t.bIt("click",function(){t.eBV(e);const n=t.XpG();return t.Njj(n.close())}),t.EFF(1," Cancel "),t.k0s()}}let b=(()=>{class l{constructor(e,s){this.dialogRef=e,this.dialogData=s,this.isApplyDisabled=!1,this.apply=()=>{this.applyFunc.then(()=>{this.close("applied")},()=>{this.close("canceled")})},this.close=(n="canceled")=>{this.dialogRef.close(n)},this.discard=()=>(this.dialogRef.close("discarded"),this.discardFunc?.())}ngOnInit(){(0,r.kZ)(this.dialogData,["applyFunc","discardFunc","isApplyDisabled"],this)}static{this.\u0275fac=function(s){return new(s||l)(t.rXU(c.ce),t.rXU(c.Qs))}}static{this.\u0275cmp=t.VBU({type:l,selectors:[["nx-modal-apply-content"]],decls:10,vars:11,consts:[[1,"modal-header"],["type","button","data-testid","closeApply","data-dismiss","modal","aria-label","Close",1,"close",3,"click"],[1,"close-content"],["translate","",1,"modal-title"],[1,"modal-footer"],["data-testid","applyChanges",3,"actionType","buttonText","clickFn","process","buttonDisabled"],["data-testid","discardChanges",3,"process","discardFn","showDiscard"],["type","button","class","btn btn-default","translate","","data-testid","cancelChanges",3,"click",4,"ngIf"],["type","button","translate","","data-testid","cancelChanges",1,"btn","btn-default",3,"click"]],template:function(s,n){1&s&&(t.j41(0,"div",0)(1,"button",1),t.bIt("click",function(){return n.close()}),t.nrm(2,"div",2),t.k0s(),t.j41(3,"h1",3),t.EFF(4," Apply changes before leaving this page? "),t.k0s()(),t.j41(5,"div",4),t.nrm(6,"nx-process-button",5),t.nI1(7,"translate"),t.nrm(8,"nx-cancel-button",6),t.DNE(9,y,2,0,"button",7),t.k0s()),2&s&&(t.R7$(6),t.Y8G("actionType","primary")("buttonText",t.bMT(7,9,"Apply"))("clickFn",n.apply)("process",n.applyFunc)("buttonDisabled",n.isApplyDisabled),t.R7$(2),t.Y8G("process",n.applyFunc)("discardFn",n.discard)("showDiscard",!0),t.R7$(),t.Y8G("ngIf",!(null!=n.applyFunc&&n.applyFunc.processing)))},dependencies:[i.MD,i.bT,p.h,u.M,h.D,d.f,_.N],encapsulation:2})}}return l})()}}]);