import{aa as c,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as n,s as i}from"./machine.-tangy-colts-beg-869.js";import{h as E,c as r}from"./apifycom-tangy-colts-beg-996.js";import{a as l}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 D=c(({helpers:t})=>({states:{components:[r(t),{componentName:t.componentName.select,fieldType:"config",helperText:e("Select an actor to get the last run."),id:"actor-id",label:e("Actor"),onChange:"HANDLE_ACTOR_ID",onRefetch:"REFETCH_ACTORS",options:[],placeholder:e("Select an actor"),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:E,HANDLE_ACTOR_ID:n("actorId"),HANDLE_STATUS:n("status"),IF_CONNECTION_SELECTED:({$:a})=>{var o;return s((o=a.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_ACTORS:({$:a})=>l(a),SET_CONNECTION:async({$:a,e:o})=>{n("connectionId")({$:a,e:o}),await l(a)},ON_MACHINE_LOAD:async({$:a})=>{i(a,[{db:"connectionId",id:"connection-id"},{db:"actorId",id:"actor-id"},{db:"status",id:"status"}]),await l(a)}}}));export{D as default};
