import{a as R,b as _}from"./chunk-K7GTGYAG.js";import{a as o,b as U,c as t,d as y,g as T,h as A}from"./chunk-Y2AHUZXY.js";import{a as P,b as Z}from"./chunk-QZVXSEZY.js";import{Gd as D,Hd as Y}from"./chunk-EW4TSJL3.js";import{a as v,b as X}from"./chunk-3JJ5PGXK.js";import{L as j,M as J,P as V,Q}from"./chunk-DCSOZT4N.js";import{Aj as I,Bj as W}from"./chunk-5XZEGBWY.js";import{g as C,h as L}from"./chunk-AIHAZUSZ.js";import{j as f,o as B}from"./chunk-HO2J6YLX.js";import{b as c,c as x}from"./chunk-IOINCEV4.js";import{Gd as b,g as a,ka as g,ma as w,na as K,r as n,sa as l,x as S,xa as d}from"./chunk-JSJB5BKT.js";import{a as h,b as m,e as p}from"./chunk-SZAW6ZBW.js";var u,F=p(()=>{u=function(e){return e[e.Created=0]="Created",e[e.Deleted=1]="Deleted",e[e.Executed=2]="Executed",e[e.Modified=3]="Modified",e[e.Viewed=4]="Viewed",e[e.PasswordViewed=5]="PasswordViewed",e[e.PasswordChanged=6]="PasswordChanged",e[e.Copied=17]="Copied",e[e.Opened=18]="Opened",e[e.Exported=19]="Exported",e[e.Synchronized=20]="Synchronized",e[e.ResetPasswordScheduleAdded=21]="ResetPasswordScheduleAdded",e[e.ResetPasswordScheduleDeleted=22]="ResetPasswordScheduleDeleted",e[e.InvalidValue=23]="InvalidValue",e[e.DevolutionsGatewayDown=24]="DevolutionsGatewayDown",e[e.Closed=25]="Closed",e[e.Expired=14]="Expired",e[e.Expiring=38]="Expiring",e}(u||{});(function(e){function G(){return"NotificationEventActionEntry"}e.getClass=G;function s(r){let i="";return typeof e.getClass=="function"&&(i=e.getClass()),i+"_"+e[r]}e.getEnumKey=s})(u||(u={}))});var k,M=p(()=>{F();U();_();w();y();b();J();Z();x();k=(()=>{class e{constructor(s,r,i){this.dataSourceSettingsService=s,this.dropdownHelper=r,this.translatorService=i,this.subscriptionEdited=new a,this.selectedCheckboxValuesChanged=new a,this.isSaving=!1,this.excludedActions=[t.Created,t.Executed,t.Viewed,t.Copied,t.Exported,t.Synchronized,t.ResetPasswordScheduleAdded,t.ResetPasswordScheduleDeleted,t.InvalidValue,t.DevolutionsGatewayDown]}initCheckboxValues(){let s=this.dataSourceSettingsService.dataSourceSettingsSnapshot?.excludedUserSubscriptionAction.concat(this.excludedActions);return this.dropdownHelper.initComboEnum(u,s).map(r=>m(h({},r),{label:this.translatorService.translate(`NotificationEventAction_${u[r.value]}`)}))}getCheckboxValuesForSessions(){let s=[t.Opened,t.Closed];return this.initCheckboxValues().filter(r=>!s.includes(r.value))}selectedValuesToFilter(s){let r=[];return s.forEach(i=>r.push({filterTarget:o.Action,textSearchModel:{inverseResult:!1,searchItem:R.ExactExpression},value:t[i.value]})),r}toggleIsSaving(){this.isSaving?setTimeout(()=>this.isSaving=!1,1e3):this.isSaving=!0}static{this.\u0275fac=function(r){return new(r||e)(d(j),d(P),d(c))}}static{this.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})()});var Ce,se=p(()=>{X();w();U();K();b();x();L();Q();A();W();M();Y();B();Ce=(()=>{class e extends v{constructor(s,r,i,z,H,O,$,q){super(s,r,i),this.subscriptionService=z,this.assetServices=H,this.userSubscriptionEditService=O,this.connectionService=$,this.router=q,this.viewRequest=new a}view(){this.viewRequest.next()}getUserSubscriptions(s=!1){return this.getCache(s,this.getUserSubscriptionsInternal())}getUserSubscriptionsViewModels(s=!1){return this.getUserSubscriptions(s).pipe(S(r=>this.toViewModels(r)))}getSubscriptionConnectionId(s){let r=s.filters.find(i=>i.filterTarget===o.ID);return r?r.value:null}refreshUserSubscriptions(){this.userSubscriptionEditService.subscriptionEdited.next()}delete(s){return this.subscriptionService.delete(s)}onEntryClick(s){let r=s.filters.find(i=>i.filterTarget===o.ID)?.value;r&&this.connectionService.getPartialConnection(r).subscribe(i=>this.router.navigate([`connections/${i.repositoryId}/${i.id}`]))}toViewModels(s){return this.subscriptionService.toViewModels(s)}getUserSubscriptionsInternal(){return this.currentUserService.isLogged()?this.assetServices.GetSubscriptionsForCurrentUser().pipe(g(s=>this.handleGetApiResult(s)),S(s=>this.returnWhenSuccessful(s,()=>s.data??[]))):n([])}static{this.\u0275fac=function(r){return new(r||e)(d(c),d(C),d(V),d(T),d(I),d(k),d(D),d(f))}}static{this.\u0275prov=l({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})()});export{u as a,F as b,k as c,M as d,Ce as e,se as f};
