import{a as S,b as j}from"./chunk-UKCYLQ3R.js";import{m as o,n as A}from"./chunk-THQOQSZV.js";import{Cc as c,Dc as b}from"./chunk-BPZQKZKD.js";import{J as l,Sa as I,be as y,d as u,g as p,na as m,r as i,ta as s,xa as f}from"./chunk-WL5U2YIT.js";import{e as a}from"./chunk-ADEKKGI2.js";var d,h=a(()=>{m();y();d=(()=>{let t=class t{constructor(){this.selectRequestSource=new p,this.selectRequest=this.selectRequestSource.asObservable()}select(e){this.selectRequestSource.next(e)}};t.\u0275fac=function(r){return new(r||t)},t.\u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})()});var W,D=a(()=>{j();m();I();A();b();y();h();W=(()=>{let t=class t extends S{constructor(e){super(),this.scanTypeSelectorService=e}edit(e){super.edit(e)}create(e){this.getScanType(e).pipe(l(r=>!!r)).subscribe(r=>{e.data={scanType:r,providerTemplate:this.providerTemplate},super.create(e)})}toInventoryScanType(e){switch(e){case c.LocalUser:return o.LocalAccounts;case c.DomainUser:return o.Domain;case c.SqlServer:return o.SQL;case c.WindowsLocalAccount:return o.Windows;case c.AzureADUser:return o.AzureAD;case c.Custom:return o.Custom;case c.SshKey:return o.SshKey;case c.PostgreSQL:return o.PostgreSQL;case c.MongoDb:return o.MongoDb;case c.AWSIAMUser:return o.AWSIAM;default:return null}}getScanType(e){return e.scanType&&i(e.scanType),e.provider?i(this.toInventoryScanType(e.provider.type)):u.create(r=>{this.scanTypeSelectorService.select({accept:(v,T)=>{this.providerTemplate=T,r.next(v),r.complete()},cancel:()=>{r.next(null),r.complete()}})})}};t.\u0275fac=function(r){return new(r||t)(f(d))},t.\u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})()});export{d as a,h as b,W as c,D as d};
