import{aa as i,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{s as h}from"./machine.-tangy-colts-beg-869.js";import{f as c}from"./machineh-tangy-colts-beg-630.js";import{h as C,c as r}from"./openaico-tangy-colts-beg-990.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,e){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,e),e)}};const E=i(({helpers:a})=>({states:{components:[r(a),{componentName:a.componentName.select,fieldType:"config",id:"batch-id",label:n("Select Batch"),onChange:"SET_BATCH",onRefetch:"REFETCH_BATCH_LIST",options:[],placeholder:n("Select a Batch"),render:"IF_CONNECTION_SELECTED",required:!0,value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:t})=>{e.setThisComponent(o=>{o.value=t}),e.setDb(o=>{o.connectionId=t}),await c(e)},IF_CONNECTION_SELECTED:({$:e})=>{var t;return s((t=e.getComponent("connection-id"))==null?void 0:t.value)},REFETCH_BATCH_LIST:async({$:e})=>{await c(e)},SET_BATCH:({$:e,e:t})=>{e.setThisComponent(o=>{o.value=t}),e.setDb(o=>{o.batchId=t})},CONNECTION_ADD_CHANGE:C,ON_MACHINE_LOAD:async({$:e})=>{h(e,[{db:"connectionId",id:"connection-id"},{db:"batchId",id:"batch-id"}])}}}));export{E as default};
