import{a as Y,b as le}from"./chunk-PKGTL5ZW.js";import{a as X,b as re}from"./chunk-TCA3QLPN.js";import{a as Q,b as ae}from"./chunk-6EWCQHA4.js";import{a as K,b as se}from"./chunk-4T5NQCD4.js";import{a as L,b as U,c as J}from"./chunk-CMCRHNFU.js";import{B as N,g as O,i as R,n as A,z as j}from"./chunk-A32B57A4.js";import{a as H,b as ie}from"./chunk-TS62PHQY.js";import{n as W,s as oe}from"./chunk-KADRYNDC.js";import{a as G,b as ne}from"./chunk-PM3MTE6X.js";import{Ac as n,Dc as z,Eb as S,Gd as B,J as c,Ja as s,Ka as a,Ob as x,Pc as V,Sb as P,Tb as w,Xc as T,Yc as E,Zc as F,cd as M,ec as r,g as C,ha as y,hc as D,ia as h,lc as q,ma as ee,md as g,na as te,nd as u,qc as l,rc as p,sa as v,sc as I,wc as k,x as f,zb as m,zc as d}from"./chunk-JSJB5BKT.js";import{e as _}from"./chunk-SZAW6ZBW.js";var Z,$=_(()=>{ee();B();Z=(()=>{class i{constructor(){this.editRequestSource=new C,this.editRequest=this.editRequestSource.asObservable()}edit(e){this.editRequestSource.next(e)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275prov=v({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})()});function de(i,ue){if(i&1){let e=k();l(0,"p-dialog",2),g(1,"translate"),F("visibleChange",function(o){s(e);let b=n();return E(b.displayDialog,o)||(b.displayDialog=o),a(o)}),d("onHide",function(){s(e);let o=n();return a(o.cancel())}),l(2,"form",3,0),I(4,"dps-pam-settings",4),p(),l(5,"p-footer")(6,"sd-submit-button",5),g(7,"translate"),d("onClick",function(){s(e);let o=n();return a(o.save())}),p(),l(8,"sd-cancel-button",6),g(9,"translate"),d("onClick",function(){s(e);let o=n();return a(o.cancel())}),p()()()}if(i&2){let e=V(3),t=n();D(M(23,pe)),z("header",u(1,17,"gbDefaultSettings")),T("visible",t.displayDialog),r("draggable",!1)("maximizable",!0)("modal",!0)("focusOnShow",!1),m(4),r("target",t.requestParams==null?null:t.requestParams.target)("settings",t.settings)("form",e)("mdColSize",12),m(2),r("disabled",!e.dirty||e.form.invalid)("label",u(7,19,"lblSave"))("parent",e),m(2),r("label",u(9,21,"lblCancel"))("parent",e)}}var pe,Ie,ge=_(()=>{te();ie();J();ne();le();ae();se();N();B();$();re();J();oe();N();pe=()=>({width:"650px",height:"780px"});Ie=(()=>{class i extends H{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(h(this.destroyed$),c(t=>!!t),f(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(c(e=>e.key===this.key),y(e=>this.getSettings(e)),c(e=>!!e.settings),h(this.destroyed$)).subscribe(e=>{this.settings=e.settings,this.requestParams=e.request,this.displayDialog=!0})}getSettings(e){return this.pamSettingsService.getSettings(!0).pipe(f(t=>({settings:t,request:e})))}static{this.\u0275fac=function(t){return new(t||i)(S(Z),S(X))}}static{this.\u0275cmp=x({type:i,selectors:[["dvl-pam-system-settings-dialog"]],features:[P],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"],[3,"onClick","disabled","label","parent"],[3,"onClick","label","parent"]],template:function(t,o){t&1&&w(0,de,10,24,"p-dialog",1),t&2&&q(o.displayDialog?0:-1)},dependencies:[U,L,W,G,Y,Q,K,j,A,O,R],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)}}"]})}}return i})()});export{Z as a,$ as b,Ie as c,ge as d};
