import{a as S,b}from"./chunk-NGDHIM3M.js";import{k as o,l as A}from"./chunk-5H6QA4VB.js";import{oc as c,pc as I}from"./chunk-5XZEGBWY.js";import{Gd as f,J as u,d as a,g as p,ma as l,na as T,r as s,sa as n,xa as m}from"./chunk-JSJB5BKT.js";import{e as i}from"./chunk-SZAW6ZBW.js";var y,d=i(()=>{l();f();y=(()=>{class r{constructor(){this.selectRequestSource=new p,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 W,x=i(()=>{b();l();T();A();I();f();d();W=(()=>{class r extends S{constructor(e){super(),this.scanTypeSelectorService=e}edit(e){super.edit(e)}create(e){this.getScanType(e).pipe(u(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.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,W as c,x as d};
