import{a as W,b as nt}from"./chunk-5ERWFFCR.js";import{a as U,b as rt}from"./chunk-ZUA53W37.js";import"./chunk-D7JMWQQY.js";import"./chunk-67GE656X.js";import"./chunk-NIC3EEBE.js";import"./chunk-JFCKIVQK.js";import{a as R,b as it}from"./chunk-MWI2V6YY.js";import"./chunk-F2AVZVRZ.js";import"./chunk-2PCDIQD3.js";import"./chunk-LYRG6635.js";import"./chunk-EBGE7YZ4.js";import{a as G,b as et}from"./chunk-TO2TTKBL.js";import"./chunk-PUS3HUME.js";import"./chunk-EBCZUYJG.js";import"./chunk-HGFSS4QV.js";import"./chunk-2MYDDNZO.js";import"./chunk-3HTIULDK.js";import"./chunk-HEMWUUTS.js";import"./chunk-SEX7W45Z.js";import"./chunk-JLS7UEBI.js";import"./chunk-NGVZ2VCZ.js";import"./chunk-EXSN6QWV.js";import"./chunk-3RHWAFOM.js";import{a as B,b as L,c as z}from"./chunk-6ZAKXZ6A.js";import"./chunk-WZMPEGTK.js";import"./chunk-S57C3QME.js";import"./chunk-56OCP2TQ.js";import"./chunk-K7KLWGRE.js";import"./chunk-Y7NDNHP3.js";import"./chunk-TVTM7EZO.js";import"./chunk-QWGO4OWP.js";import"./chunk-ITLUXIFD.js";import"./chunk-GJFVOOZQ.js";import"./chunk-LK2BF24O.js";import"./chunk-RGY5WL55.js";import"./chunk-A3Y77RII.js";import"./chunk-5DATZV72.js";import"./chunk-PZQSNFBQ.js";import"./chunk-EGQEIUT7.js";import"./chunk-KGR5VWH6.js";import"./chunk-FJ2QCXND.js";import"./chunk-5RJU5RWU.js";import"./chunk-CMCRHNFU.js";import"./chunk-TLQUMYDX.js";import"./chunk-ISAYYL4P.js";import"./chunk-AI2IV5XU.js";import{B as E,g as k,i as I,n as A,z as M}from"./chunk-A32B57A4.js";import{a as O,b as $,c as q}from"./chunk-J75YHVMQ.js";import{H as N,J as Y}from"./chunk-4EQLHXW7.js";import"./chunk-QQZCALHS.js";import"./chunk-WKM7YEYY.js";import"./chunk-ANSWGJBN.js";import{Ua as H,Va as tt}from"./chunk-XBRJZCAD.js";import"./chunk-AIHAZUSZ.js";import"./chunk-TS62PHQY.js";import"./chunk-KADRYNDC.js";import{a as j,b as x}from"./chunk-PM3MTE6X.js";import"./chunk-HO2J6YLX.js";import{b as Q,c as Z}from"./chunk-IOINCEV4.js";import"./chunk-Z5RJRCWC.js";import{Dc as F,Eb as p,Gd as X,J as a,Ja as c,Jc as P,Ka as g,Kc as D,Lc as w,Ob as f,Pc as _,Sb as h,ec as o,ia as m,md as T,na as K,nd as V,qc as s,rc as d,sc as S,tc as v,uc as C,wc as b,x as u,zb as l,zc as y}from"./chunk-JSJB5BKT.js";import{e as J}from"./chunk-SZAW6ZBW.js";var ot,Dt,st=J(()=>{K();E();et();tt();x();rt();Y();q();z();nt();X();Z();it();q();z();E();ot=["currentForm"],Dt=(()=>{class n extends G{constructor(t,e){super(),this.translatorService=t,this.pamSettingsService=e,this.titleHeader=[{title:this.translatorService.translate("gbAdministration"),link:"/administration/"},{title:this.translatorService.translate("gbPrivilegeAccessManagement"),link:"/administration/pam/"},{title:this.translatorService.translate("gbDefaultSettings")}],this.settings=new H,this.isFormLoaded=!1}get isDirty(){return this.currentForm?this.isFormLoaded&&this.currentForm.dirty:!1}getComponentTitle(){return"gbDefaultSettings"}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(m(this.destroyed$),a(t=>!!t),u(t=>!!t))}getSettings(){this.pamSettingsService.getSettings(!0).pipe(m(this.destroyed$),a(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)(p(Q),p(R))}}static{this.\u0275cmp=f({type:n,selectors:[["dvls-pam-settings-dashboard"]],viewQuery:function(e,i){if(e&1&&P(ot,5),e&2){let r;D(r=w())&&(i.currentForm=r.first)}},features:[h],decls:8,vars:8,consts:[["currentForm","ngForm"],[3,"titlePage"],["header-right",""],["styleClass","button-action","showDelay","500","tooltipPosition","bottom","icon","di dvl-icon-save",3,"onClick","pTooltip","disabled"],["autocomplete","off","novalidate","",1,"full-height"],[3,"settings","form","mdColSize"]],template:function(e,i){if(e&1){let r=b();s(0,"dvl-page-wrapper-v2",1),v(1,2),s(2,"p-button",3),T(3,"translate"),y("onClick",function(){return c(r),g(i.save())}),d(),C(),s(4,"form",4,0)(6,"p-fieldset"),S(7,"dps-pam-settings",5),d()()()}if(e&2){let r=_(5);o("titlePage",i.titleHeader),l(2),F("pTooltip",V(3,6,"lblSave")),o("disabled",!i.isDirty),l(5),o("settings",i.settings)("form",r)("mdColSize",12)}},dependencies:[j,U,N,$,O,L,B,M,A,k,I,W],encapsulation:2})}}return n})()});st();export{Dt as PamSettingsDashboardComponent};
