import {K as Ke,P as Pt}from'./chunk-CMFbAvbn.js';import {I as Ie,G as Ge}from'./chunk-Ctuz9302.js';import {J,a5 as fh,aV as ut,fm as Kh,i as S,dt as Mr,hY as d_,U as RN,c as tS,H as ul,fn as Ot,bE as ff,aq as Sr,ah as ot,w as wo,N as Sr$1,f as QT,X as _z,dO as W1,i0 as V6,i1 as c_,bg as lt,b_ as iH,c0 as XN,c1 as Tc,u as R,a0 as ks,e5 as Gu,z as vM,a3 as Py,a2 as Uu,e6 as zu,a1 as Ny,co as E_,a4 as Sy,A as Iw,cg as J_,F as EM,bu as dy,bv as Vy,bw as y_,bx as v_}from'./main-WUGO6e7n.js';import {C,x}from'./chunk-C5G179Xd.js';import {J as J$1,$}from'./chunk-DTKExQCa.js';import'./chunk-DeGPLgur.js';import'./chunk-DaKfh_z9.js';import'./chunk-IXz4FSkj.js';import'./chunk-CIbFTbhP.js';import'./chunk-DgjB3m1L.js';import'./chunk-Blf_arF2.js';import'./chunk-4Rs3CU3G.js';import'./chunk-BLhNg7Xk.js';import'./chunk-WnN3EHPQ.js';import'./chunk-C-UoRr_7.js';import'./chunk-D-s0qb_B.js';import'./chunk-CWfXzReb.js';import'./chunk-DATJc-cZ.js';import'./chunk-22oEX_gu.js';var et,vt,it=J(()=>{fh();ut();C();Kh();S();Ie();Mr();d_();Ke();RN();tS();ul();J$1();d_();ut();et=["currentForm"],vt=(()=>{class n extends x{constructor(t,e){super(),this.translatorService=t,this.pamSettingsService=e,this.titleHeader=[{title:this.translatorService.translate("lblAdministration")},{title:this.translatorService.translate("lblPrivilegedAccessManagement"),link:"/administration/pam/"},{title:this.translatorService.translate("lblDefaultSettings")}],this.settings=new Ot,this.isFormLoaded=!1;}get isDirty(){return this.currentForm?this.isFormLoaded&&this.currentForm.dirty:!1}getComponentTitle(){return "lblDefaultSettings"}ngOnInit(){super.ngOnInit();}ngAfterViewInit(){this.getSettings();}save(){return this.onSubmit().subscribe(()=>this.setFormPristine())}cancelChange(){return !1}rejectChange(){return !0}validateChange(){return this.onSubmit()}onSubmit(){return this.pamSettingsService.setSettings(this.settings).pipe(ff(this.destroyed$),Sr(t=>!!t),ot(t=>!!t))}getSettings(){this.pamSettingsService.getSettings(!0).pipe(ff(this.destroyed$),Sr(t=>!!t)).subscribe(t=>{this.settings=t,this.setFormPristine(),this.isFormLoaded=!0;});}setFormPristine(){setTimeout(()=>{this.currentForm?.form?.markAsPristine(),this.currentForm?.form?.updateValueAndValidity();});}static{this.\u0275fac=function(e){return new(e||n)(wo(Sr$1),wo($))};}static{this.\u0275cmp=QT({type:n,selectors:[["dvls-pam-settings-dashboard"]],viewQuery:function(e,i){if(e&1&&Vy(et,5),e&2){let r;y_(r=v_())&&(i.currentForm=r.first);}},features:[dy],decls:8,vars:9,consts:[["currentForm","ngForm"],[3,"titlePage"],["header-right",""],["variant","icon","showDelay","500","tooltipPosition","bottom","icon","di dvl-icon-save",3,"onClick","dvlTooltip","disabled"],["autocomplete","off","novalidate","",1,"full-height"],[3,"settings","form","mdColSize"]],template:function(e,i){if(e&1&&(ks(0,"dvl-page-wrapper-v2",1),Gu(1,2),ks(2,"dvl-button",3),vM(3,"translate"),Py("onClick",function(){return i.save()}),Uu(),zu(),ks(4,"form",4,0)(6,"p-fieldset"),Ny(7,"dps-pam-settings",5),Uu()()()),e&2){let r=E_(5);Sy("titlePage",i.titleHeader),Iw(2),Sy("dvlTooltip",J_(EM(3,7,"lblSave")))("disabled",!i.isDirty),Iw(5),Sy("settings",i.settings)("form",r)("mdColSize",12);}},dependencies:[Ge,_z,W1,V6,c_,lt,iH,XN,Tc,Pt,R],encapsulation:2,changeDetection:1});}}return n})();});it();export{vt as PamSettingsDashboardComponent};