import{a as $,b as me}from"./chunk-UFLBGB26.js";import{a as Z,b as ce}from"./chunk-WWM2WDZD.js";import{a as Y,b as le}from"./chunk-K5SKMCYC.js";import{a as X,b as re}from"./chunk-N6V36G77.js";import{a as Q,b as ae}from"./chunk-6POW7SSJ.js";import{C as H,E as W,g as A,i as j,n as N}from"./chunk-JPHJ3OD7.js";import{n as U,o as J,p as K}from"./chunk-ZBM6BFOI.js";import{a as G,b as oe}from"./chunk-QGVT6DPT.js";import{Ha as L,La as se}from"./chunk-5E3JCGAH.js";import{Ad as f,Dc as C,Ea as r,Fa as l,Hc as g,J as d,Jb as b,Jc as s,Qb as q,Sa as ne,Tc as y,Ub as D,Wb as I,Wc as V,be as R,cd as E,dd as M,ed as B,g as x,ha as w,ia as _,id as F,mc as k,na as ie,oc as T,pd as O,ta as P,tc as a,uc as c,vc as m,wc as z,x as h,yb as S,zd as u}from"./chunk-WL5U2YIT.js";import{e as v}from"./chunk-ADEKKGI2.js";var ee,te=v(()=>{ie();R();ee=(()=>{let i=class i{constructor(){this.editRequestSource=new x,this.editRequest=this.editRequestSource.asObservable()}edit(e){this.editRequestSource.next(e)}};i.\u0275fac=function(t){return new(t||i)},i.\u0275prov=P({token:i,factory:i.\u0275fac,providedIn:"root"});let n=i;return n})()});function ue(n,i){if(n&1){let o=C();c(0,"sd-submit-button",6),u(1,"translate"),g("onClick",function(){r(o);let t=s(2);return l(t.save())}),m(),c(2,"sd-cancel-button",7),u(3,"translate"),g("onClick",function(){r(o);let t=s(2);return l(t.cancel())}),m()}if(n&2){s();let o=y(3);a("disabled",!o.dirty||o.form.invalid)("label",f(1,5,"lblSave"))("parent",o),S(2),a("label",f(3,7,"lblCancel"))("parent",o)}}function fe(n,i){if(n&1){let o=C();c(0,"p-dialog",2),u(1,"translate"),B("visibleChange",function(t){r(o);let p=s();return M(p.displayDialog,t)||(p.displayDialog=t),l(t)}),g("onHide",function(){r(o);let t=s();return l(t.cancel())}),c(2,"form",3,0),z(4,"dps-pam-settings",4),m(),I(5,ue,4,9,"ng-template",5),m()}if(n&2){let o=y(3),e=s();V(O(15,ge)),a("header",F(f(1,13,"lblDefaultSettings"))),E("visible",e.displayDialog),a("draggable",!1)("maximizable",!0)("modal",!0)("focusOnShow",!1),S(4),a("target",e.requestParams==null?null:e.requestParams.target)("settings",e.settings)("form",o)("mdColSize",12)}}var ge,Te,he=v(()=>{ne();oe();K();ae();me();ce();le();W();R();te();re();K();se();W();ge=()=>({width:"650px",height:"780px"});Te=(()=>{let i=class i extends G{constructor(e,t){super(),this.pamSystemSettingsEditService=e,this.pamSettingsService=t,this.displayDialog=!1}ngOnInit(){this.subscribeToEditRequest()}save(){this.callActionAccept()}cancel(){this.callActionCancel()}callActionAccept(e=!0){this.pamSettingsService.setSettings(this.settings).pipe(_(this.destroyed$),d(t=>!!t),h(t=>!!t)).subscribe(()=>{this.requestParams&&this.requestParams.accept&&(this.requestParams.accept(),this.requestParams=null),e&&(this.displayDialog=!1)})}callActionCancel(e=!0){this.requestParams&&this.requestParams.cancel&&(this.requestParams.cancel(),this.requestParams=null),e&&(this.displayDialog=!1)}subscribeToEditRequest(){this.pamSystemSettingsEditService.editRequest.pipe(d(e=>e.key===this.key),w(e=>this.getSettings(e)),d(e=>!!e.settings),_(this.destroyed$)).subscribe(e=>{this.settings=e.settings,this.requestParams=e.request,this.displayDialog=!0})}getSettings(e){return this.pamSettingsService.getSettings(!0).pipe(h(t=>({settings:t,request:e})))}};i.\u0275fac=function(t){return new(t||i)(b(ee),b(X))},i.\u0275cmp=q({type:i,selectors:[["dvl-pam-system-settings-dialog"]],features:[D],decls:1,vars:1,consts:[["form","ngForm"],["closeIcon","di dvl-icon-close","minimizeIcon","di dvl-icon-minimize","maximizeIcon","di dvl-icon-expand",3,"header","visible","style","draggable","maximizable","modal","focusOnShow"],["closeIcon","di dvl-icon-close","minimizeIcon","di dvl-icon-minimize","maximizeIcon","di dvl-icon-expand",3,"visibleChange","onHide","header","visible","draggable","maximizable","modal","focusOnShow"],["autocomplete","off","novalidate","",1,"full-height"],[3,"target","settings","form","mdColSize"],["pTemplate","footer"],[3,"onClick","disabled","label","parent"],[3,"onClick","label","parent"]],template:function(t,p){t&1&&k(0,fe,6,16,"p-dialog",1),t&2&&T(p.displayDialog?0:-1)},dependencies:[J,U,L,$,Z,Y,H,N,A,j,Q],styles:["[_nghost-%COMP%]     .p-dialog .p-dialog-content{overflow:auto}@supports not selector(::-webkit-scrollbar){[_nghost-%COMP%]     .p-dialog .p-dialog-content{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color) var(--scrollbar-background-color)}}"]});let n=i;return n})()});export{ee as a,te as b,Te as c,he as d};
