import{a as te,b as fe}from"./chunk-V36IMNCI.js";import{a as ie,b as ue}from"./chunk-ZUA53W37.js";import"./chunk-NIC3EEBE.js";import"./chunk-JFCKIVQK.js";import{a as ee,b as ge}from"./chunk-WNDL33UX.js";import"./chunk-EBCZUYJG.js";import{a as Y,b as Z,c as $}from"./chunk-CTRWVN5I.js";import"./chunk-LBARZOQF.js";import{a as X,b as ce}from"./chunk-JGMEHM4J.js";import{a as Q,b as de}from"./chunk-JLS7UEBI.js";import"./chunk-EXSN6QWV.js";import"./chunk-Z4TIEBXX.js";import"./chunk-BR4ZCCQP.js";import{a as U,b as z,c as G}from"./chunk-56OCP2TQ.js";import"./chunk-Y7NDNHP3.js";import"./chunk-BXBF54ET.js";import{a as R,b as me}from"./chunk-LK2BF24O.js";import"./chunk-AI2IV5XU.js";import{B as N,f as B,g as V,i as D,m as P,n as W,z as O}from"./chunk-A32B57A4.js";import{a as q,b as J,c as K}from"./chunk-J75YHVMQ.js";import{H as L,J as le}from"./chunk-4EQLHXW7.js";import"./chunk-DCSOZT4N.js";import"./chunk-5XZEGBWY.js";import{a as H,b as se}from"./chunk-AIHAZUSZ.js";import"./chunk-TS62PHQY.js";import"./chunk-KADRYNDC.js";import{a as j,b as pe}from"./chunk-PM3MTE6X.js";import"./chunk-HO2J6YLX.js";import"./chunk-IOINCEV4.js";import"./chunk-Z5RJRCWC.js";import{Ac as d,Dc as l,Eb as v,Gd as ae,Ja as c,Ka as g,Ob as A,Pc as k,Sb as M,Tb as x,X as S,Xc as b,Yc as h,Zc as _,d as y,ec as r,ia as f,lc as E,ma as ne,md as p,na as re,nd as s,qc as a,rc as u,sc as C,tc as w,uc as I,wc as T,zb as n,zc as F}from"./chunk-JSJB5BKT.js";import{e as oe}from"./chunk-SZAW6ZBW.js";function ve(o,be){if(o&1){let i=T();a(0,"dvl-page-wrapper-v2",1),w(1,2),a(2,"p-button",3),p(3,"translate"),F("onClick",function(){c(i);let t=d();return g(t.submitForm())}),u(),I(),a(4,"form",4,0),C(6,"p-message",5),p(7,"translate"),C(8,"sd-message-summary",6),a(9,"div",7)(10,"p-checkbox",8),p(11,"translate"),_("ngModelChange",function(t){c(i);let m=d();return h(m.configuration.isApprovalSecureMessageEnabled,t)||(m.configuration.isApprovalSecureMessageEnabled=t),g(t)}),u()(),a(12,"div",7)(13,"p-checkbox",9),p(14,"translate"),p(15,"translate"),_("ngModelChange",function(t){c(i);let m=d();return h(m.configuration.isApprovalEmailEnabled,t)||(m.configuration.isApprovalEmailEnabled=t),g(t)}),u()()()()}if(o&2){let i=k(5),e=d();r("titlePage",e.titleHeader),n(2),l("pTooltip",s(3,13,"lblSave")),r("disabled",!e.isDirty),n(4),l("text",s(7,15,"lblApprovalInformation")),n(2),r("messages",e.errorSummaryMessages),n(2),l("label",s(11,17,"lblSecureMessage")),r("sdAddToForm",i),b("ngModel",e.configuration.isApprovalSecureMessageEnabled),n(3),l("label",s(14,19,"lblApprovalEmailWithApprovalLink")),l("pTooltip",s(15,21,"lblApprovalEmailMustBeEnabled")),r("disabled",!e.configuration.isEmailEnabled)("sdAddToForm",i),b("ngModel",e.configuration.isApprovalEmailEnabled)}}var Le,Ce=oe(()=>{fe();ne();re();se();ue();le();$();ce();K();G();pe();N();de();ae();ge();me();$();K();G();N();Le=(()=>{class o extends te{constructor(i,e){super(),this.configurationService=i,this.longOperationIndicatorService=e,this.titleHeader=[{title:"lblAdministration",link:"/administration"},{title:"gbDPSSettings",link:"/administration/server-settings"},{title:"lblApproval"}],this.tabTitle="lblApproval"}ngOnInit(){super.ngOnInit(),this.getEmailConfiguration()}getEmailConfiguration(){this.longOperationIndicatorService.showIndicator(),this.configurationService.getApprovalConfiguration().pipe(f(this.destroyed$),S(()=>this.longOperationIndicatorService.hideIndicator())).subscribe(i=>this.configuration=i)}save(){return new y(i=>{this.configurationService.updateApproval(this.configuration).pipe(f(this.destroyed$)).subscribe(e=>{e.result===H.Success?(this.getEmailConfiguration(),i.next(!0),i.complete()):(this.showError(this.translatorService.translate("lblApprovalSaveError")),i.next(!1),i.complete())})})}static{this.\u0275fac=function(e){return new(e||o)(v(ee),v(R))}}static{this.\u0275cmp=A({type:o,selectors:[["dvls-approval-configuration"]],features:[M],decls:1,vars:1,consts:[["currentForm","ngForm"],[3,"titlePage"],["header-right",""],["styleClass","button-action","showDelay","500","tooltipPosition","left","icon","di dvl-icon-save",3,"onClick","disabled","pTooltip"],["autocomplete","off","novalidate",""],["severity","info",3,"text"],[3,"messages"],[1,"form-group"],["binary","true","name","enableSecureMessage",3,"ngModelChange","label","sdAddToForm","ngModel"],["binary","true","name","enableEmailDisabled",3,"ngModelChange","label","disabled","sdAddToForm","pTooltip","ngModel"]],template:function(e,t){e&1&&x(0,ve,16,23,"dvl-page-wrapper-v2",1),e&2&&E(t.configuration?0:-1)},dependencies:[ie,L,Z,Y,X,J,q,z,U,j,O,W,B,V,P,D,Q],encapsulation:2})}}return o})()});Ce();export{Le as ApprovalConfigurationComponent};
