import{b as i,i as s}from"./useflows-BpG3C9m1.js";import{e as a}from"./main-few-lands-burn.js";import{s as C}from"./machine.-BRuqPpdF.js";import{f as c}from"./machineh-DnUoNsH-.js";import{h as r,c as m}from"./openaico-BZSnTkIZ.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const N=i(({helpers:n})=>({states:{components:[m(n),{componentName:n.componentName.select,fieldType:"config",id:"batch-id",label:a("Select Batch For Cancel"),onChange:"SET_BATCH",onRefetch:"REFETCH_BATCH_LIST",optionFilterProp:"label",options:[],placeholder:a("Select a Batch"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!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})=>s(e.getComponent("connection-id")?.value),REFETCH_BATCH_LIST:async({$:e})=>{await c(e)},SET_BATCH:({$:e,e:t})=>{e.setThisComponent(o=>{o.value=t}),e.setDb(o=>{o.batch=t})},CONNECTION_ADD_CHANGE:r,ON_MACHINE_LOAD:async({$:e})=>{C(e,[{db:"connectionId",id:"connection-id"},{db:"batch",id:"batch-id"}])}}}));export{N as default};
