import{a as S,b as A}from"./chunk-WJY6GDZG.js";import{k as o,l as b}from"./chunk-SS6ERTE2.js";import{wc as c,xc as I}from"./chunk-2GUKPKKM.js";import{J as p,Sd as f,d as a,g as u,na as l,oa as T,r as s,ta as n,ya as m}from"./chunk-XJKQ67XR.js";import{e as i}from"./chunk-SZAW6ZBW.js";var y,d=i(()=>{l();f();y=(()=>{class r{constructor(){this.selectRequestSource=new u,this.selectRequest=this.selectRequestSource.asObservable()}select(e){this.selectRequestSource.next(e)}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});var U,w=i(()=>{A();l();T();b();I();f();d();U=(()=>{class r extends S{constructor(e){super(),this.scanTypeSelectorService=e}edit(e){super.edit(e)}create(e){this.getScanType(e).pipe(p(t=>!!t)).subscribe(t=>{e.data={scanType:t,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&&s(e.scanType),e.provider?s(this.toInventoryScanType(e.provider.type)):a.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)(m(y))}}static{this.\u0275prov=n({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})()});export{y as a,d as b,U as c,w as d};
