import {u,d as d$1}from'./chunk-BrIGe1dS.js';import {J,a6 as pi,a5 as fh,nt as Ht,f5 as so,c as tS,aq as Sr,f7 as q,nC as w$1,al as Kv,a8 as x,aa as ye,ad as ce,bP as he}from'./main-WUGO6e7n.js';var y,d=J(()=>{pi();tS();y=(()=>{class r{constructor(){this.selectRequestSource=new he,this.selectRequest=this.selectRequestSource.asObservable();}select(e){this.selectRequestSource.next(e);}static{this.\u0275fac=function(t){return new(t||r)};}static{this.\u0275prov=ce({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();});var U,w=J(()=>{u();pi();fh();Ht();so();tS();d();U=(()=>{class r extends d$1{constructor(e){super(),this.scanTypeSelectorService=e;}edit(e){super.edit(e);}create(e){this.getScanType(e).pipe(Sr(t=>!!t)).subscribe(t=>{e.data={scanType:t,providerTemplate:this.providerTemplate},super.create(e);});}toInventoryScanType(e){switch(e){case q.LocalUser:return w$1.LocalAccounts;case q.DomainUser:return w$1.Domain;case q.SqlServer:return w$1.SQL;case q.WindowsLocalAccount:return w$1.Windows;case q.AzureADUser:return w$1.AzureAD;case q.Custom:return w$1.Custom;case q.SshKey:return w$1.SshKey;case q.PostgreSQL:return w$1.PostgreSQL;case q.MongoDb:return w$1.MongoDb;case q.AWSIAMUser:return w$1.AWSIAM;default:return null}}getScanType(e){return e.scanType&&Kv(e.scanType),e.provider?Kv(this.toInventoryScanType(e.provider.type)):x.create(t=>{this.scanTypeSelectorService.select({accept:(h,v)=>{this.providerTemplate=v,t.next(h),t.complete();},cancel:()=>{t.next(null),t.complete();}});})}static{this.\u0275fac=function(t){return new(t||r)(ye(y))};}static{this.\u0275prov=ce({token:r,factory:r.\u0275fac,providedIn:"root"});}}return r})();});export{U,d,w,y};