import{aa as i,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as o,s as c}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(a,t){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,t),t)}};const h=i(({helpers:a})=>({states:{components:[r(a),{componentName:a.componentName.select,fieldType:"config",helperText:e("Select an actor to get runs from."),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:a.componentName.mixInput,helperText:e("Maximum number of array elements to return. The default value as well as the maximum is 1000."),id:"limit",label:e("Limit"),onChange:"HANDLE_LIMIT",path:"limit",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:a.componentName.mixInput,helperText:e("Number of array elements that should be skipped at the start. The default value is 0."),id:"offset",label:e("Offset"),onChange:"HANDLE_OFFSET",path:"offset",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:a.componentName.switch,helperText:e("Return runs in descending order based on their start time"),id:"desc",label:e("Desc"),onChange:"HANDLE_DESC",path:"desc",render:"IF_CONNECTION_SELECTED",size:"small",value:!1},{componentName:a.componentName.select,helperText:e("Filter runs by status."),id:"status",label:e("Status"),onChange:"HANDLE_STATUS",options:[{label:e("ALL"),value:"ALL"},{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"}],render:"IF_CONNECTION_SELECTED",value:"ALL"}]},actions:{CONNECTION_ADD_CHANGE:E,HANDLE_ACTOR_ID:o("actorId"),HANDLE_DESC:o("desc"),HANDLE_LIMIT:o("limit"),HANDLE_OFFSET:o("offset"),HANDLE_STATUS:o("status"),IF_CONNECTION_SELECTED:({$:t})=>{var n;return s((n=t.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_ACTORS:({$:t})=>l(t),SET_CONNECTION:async({$:t,e:n})=>{o("connectionId")({$:t,e:n}),await l(t)},ON_MACHINE_LOAD:async({$:t})=>{c(t,[{db:"connectionId",id:"connection-id"},{db:"actorId",id:"actor-id"},{db:"limit",id:"limit"},{db:"offset",id:"offset"},{db:"status",id:"status"},{db:"desc",id:"desc"}]),await l(t)}}}));export{h as default};
