import{a as oe,b as Ce}from"./chunk-ZHTK4OF3.js";import{a as te,b as be}from"./chunk-ERBABQHD.js";import"./chunk-AQH4BMGD.js";import{a as ie,b as fe}from"./chunk-7WU3BKCA.js";import"./chunk-OGIVSRCZ.js";import"./chunk-GPOUKG47.js";import"./chunk-JQYQFR5I.js";import{a as $,b as ue}from"./chunk-5I5VK67P.js";import{a as ee,b as ve}from"./chunk-PTRVZES4.js";import{a as Z,b as ge}from"./chunk-NC2262CC.js";import"./chunk-JFZLN2FV.js";import"./chunk-A22EQSF3.js";import"./chunk-I7GW4F3B.js";import{a as X,b as me}from"./chunk-MOK7XOAA.js";import"./chunk-U46PHU2W.js";import{a as Y,b as ce}from"./chunk-6POW7SSJ.js";import{cb as K,fb as Q,zb as de}from"./chunk-V2ECYACM.js";import{C as N,E as L,f as k,g as D,i as B,m as V,n as O}from"./chunk-JPHJ3OD7.js";import{f as z,g as G,h as R,q as U,r as q,s as J}from"./chunk-ZBM6BFOI.js";import"./chunk-AGRQYW7D.js";import"./chunk-WFM63CSH.js";import"./chunk-SM7EQ7ST.js";import"./chunk-RWCAFOHA.js";import{cc as H,dc as pe}from"./chunk-BPZQKZKD.js";import{a as j,b as se}from"./chunk-6B6CBPYV.js";import"./chunk-QGVT6DPT.js";import"./chunk-5E3JCGAH.js";import"./chunk-HTXYTVN4.js";import"./chunk-YBNTOQCK.js";import"./chunk-LDWBA6DZ.js";import{Ac as T,Ad as m,Bc as P,Dc as F,Ea as g,Fa as u,Hc as I,Jb as b,Jc as c,Qb as E,Sa as ae,Tc as W,Ub as M,X as y,be as le,cd as h,d as _,dd as A,ed as S,ia as f,id as p,mc as x,na as re,oc as w,tc as t,uc as s,vc as v,wc as C,yb as r,zd as d}from"./chunk-WL5U2YIT.js";import{e as ne}from"./chunk-ADEKKGI2.js";function he(a,o){if(a&1){let l=F();s(0,"dvl-page-wrapper-v2",1),T(1,2),s(2,"dvl-button",3),d(3,"translate"),I("onClick",function(){g(l);let i=c();return u(i.submitForm())}),v(),P(),s(4,"form",4,0),C(6,"p-message",5),d(7,"translate"),C(8,"sd-message-summary",6),s(9,"div",7)(10,"dvl-checkbox",8),d(11,"translate"),S("ngModelChange",function(i){g(l);let n=c();return A(n.configuration.isApprovalSecureMessageEnabled,i)||(n.configuration.isApprovalSecureMessageEnabled=i),u(i)}),v()(),s(12,"div",7)(13,"dvl-checkbox",9),d(14,"translate"),d(15,"translate"),S("ngModelChange",function(i){g(l);let n=c();return A(n.configuration.isApprovalEmailEnabled,i)||(n.configuration.isApprovalEmailEnabled=i),u(i)}),v()()()()}if(a&2){let l=W(5),e=c();t("titlePage",e.titleHeader),r(2),t("dvlTooltip",p(m(3,21,"lblSave")))("disableWithoutAdminPermission",e.AdministrativePermission.ServerSettingsApprovalsEdit)("disabled",!e.isDirty),r(2),t("disableWithoutAdminPermission",e.AdministrativePermission.ServerSettingsAdvancedEdit)("readonlyContainer",!0),r(2),t("text",p(m(7,23,"lblApprovalInformation"))),r(2),t("messages",e.errorSummaryMessages),r(2),t("label",p(m(11,25,"lblSecureMessage")))("sdAddToForm",l),h("ngModel",e.configuration.isApprovalSecureMessageEnabled),r(3),t("label",p(m(14,27,"lblApprovalEmailWithApprovalLink")))("pTooltip",p(m(15,29,"lblApprovalEmailMustBeEnabled")))("disabled",!e.configuration.isEmailEnabled)("sdAddToForm",l),h("ngModel",e.configuration.isApprovalEmailEnabled)}}var He,Ae=ne(()=>{Ce();re();ae();se();be();J();ue();R();de();ce();L();ge();pe();ve();le();fe();me();J();R();L();He=(()=>{let o=class o extends oe{constructor(e,i){super(),this.configurationService=e,this.longOperationIndicatorService=i,this.titleHeader=[{title:"lblAdministration"},{title:"lblServerSettings",link:"/administration/server-settings"},{title:"lblApproval"}],this.AdministrativePermission=H,this.tabTitle="lblApproval"}ngOnInit(){super.ngOnInit(),this.getEmailConfiguration()}getEmailConfiguration(){this.longOperationIndicatorService.showIndicator(),this.configurationService.getApprovalConfiguration().pipe(f(this.destroyed$),y(()=>this.longOperationIndicatorService.hideIndicator())).subscribe(e=>this.configuration=e)}save(){return new _(e=>{this.configurationService.updateApproval(this.configuration).pipe(f(this.destroyed$)).subscribe(i=>{i.result===j.Success?(this.getEmailConfiguration(),e.next(!0),e.complete()):(this.showError(this.translatorService.translate("lblApprovalSaveError")),e.next(!1),e.complete())})})}};o.\u0275fac=function(i){return new(i||o)(b(ie),b(X))},o.\u0275cmp=E({type:o,selectors:[["dvls-approval-configuration"]],features:[M],decls:1,vars:1,consts:[["currentForm","ngForm"],[3,"titlePage"],["header-right",""],["variant","icon","showDelay","500","tooltipPosition","left","icon","di dvl-icon-save",3,"onClick","disableWithoutAdminPermission","disabled","dvlTooltip"],["autocomplete","off","novalidate","",3,"disableWithoutAdminPermission","readonlyContainer"],["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(i,n){i&1&&x(0,he,16,31,"dvl-page-wrapper-v2",1),i&2&&w(n.configuration?0:-1)},dependencies:[te,K,q,U,$,G,z,Q,N,O,k,D,V,B,Z,ee,Y],encapsulation:2});let a=o;return a})()});Ae();export{He as ApprovalConfigurationComponent};
