import{aa as d,ab as n}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as c,s as E}from"./machine.-tangy-colts-beg-869.js";import{h,f as i,a as r,c as p,d as T}from"./zohoproj-tangy-colts-beg-65.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const N=d(({helpers:t})=>({states:{components:[T(t),{componentName:t.componentName.select,fieldType:"config",helperText:a("Select the portal where the project is located."),id:"portal-id",label:a("Portal ID"),onChange:"HANDLE_SELECT_PORTAL",onRefetch:"REFETCH_PORTAL_LIST",options:[],path:"portal-id",render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:t.componentName.select,fieldType:"config",helperText:a("Select the project you want to delete."),id:"project-id",label:a("Project ID"),onChange:"SET_PROJECT_ID",onRefetch:"REFETCH_PROJECT_LIST",options:[],path:"project-id",render:"IF_PORTAL_SELECTED",required:!0,showSearch:!0,value:void 0}]},actions:{CONNECTION_ADD_CHANGE:p,IF_CONNECTION_SELECTED:({$:e})=>{var o;return n((o=e.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_PORTAL_LIST:({$:e})=>r(e),REFETCH_PROJECT_LIST:({$:e})=>i(e),SET_DOMAIN:h,SET_PROJECT_ID:c("projectId"),HANDLE_SELECT_PORTAL:({$:e,e:o})=>{c("portalId")({$:e,e:o}),i(e)},IF_PORTAL_SELECTED:({$:e})=>{var o,l;return n((o=e.getComponent("connection-id"))==null?void 0:o.value)&&n((l=e.getComponent("portal-id"))==null?void 0:l.value)},SET_CONNECTION:({$:e,e:o})=>{c("connectionId")({$:e,e:o}),r(e)},ON_MACHINE_LOAD:async({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"portalId",id:"portal-id"},{db:"projectId",id:"project-id"}]),await Promise.all([r(e),i(e)])}}}));export{N as default};
