import{aa as l,ab as i}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as n,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as T}from"./apifycom-tangy-colts-beg-996.js";import{f as s}from"./machineh-tangy-colts-beg-696.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,a){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,a),a)}};const I=l(({helpers:t})=>({states:{components:[T(t),{componentName:t.componentName.select,fieldType:"config",helperText:e("Select a task to run."),id:"task-id",label:e("Task"),onChange:"HANDLE_TASK_ID",onRefetch:"REFETCH_TASKS",options:[],placeholder:e("Select a task"),render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:t.componentName.select,helperText:e("Filter runs by their status"),id:"status",label:e("Status"),onChange:"HANDLE_STATUS",options:[{label:e("SUCCEEDED"),value:"SUCCEEDED"},{label:e("ABORTED"),value:"ABORTED"},{label:e("ABORTING"),value:"ABORTING"},{label:e("FAILED"),value:"FAILED"},{label:e("READY"),value:"READY"},{label:e("RUNNING"),value:"RUNNING"},{label:e("TIMED-OUT"),value:"TIMED-OUT"},{label:e("TIMING-OUT"),value:"TIMING-OUT"}],path:"status",render:"IF_CONNECTION_SELECTED",value:"SUCCEEDED"}]},actions:{CONNECTION_ADD_CHANGE:c,HANDLE_STATUS:n("status"),HANDLE_TASK_ID:n("taskId"),IF_CONNECTION_SELECTED:({$:a})=>{var o;return i((o=a.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_TASKS:({$:a})=>s(a),SET_CONNECTION:async({$:a,e:o})=>{n("connectionId")({$:a,e:o}),await s(a)},ON_MACHINE_LOAD:async({$:a})=>{E(a,[{db:"connectionId",id:"connection-id"},{db:"taskId",id:"task-id"},{db:"status",id:"status"}]),await s(a)}}}));export{I as default};
