import{aa as c,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{h as n,s as r}from"./machine.-tangy-colts-beg-869.js";import{h as l,c as d}from"./commons.-tangy-colts-beg-737.js";import{f as i}from"./machineh-tangy-colts-beg-921.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const T=c(({helpers:t})=>({states:{components:[d(t),{componentName:t.componentName.select,helperText:o("Select the list you want to update."),id:"list-id",isLoadable:!0,label:o("List ID"),onChange:"SET_LIST",onRefetch:"REFETCH_LIST",optionFilterProp:"label",options:[],path:"data.id",placeholder:o("Select a List"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:t.componentName.mixInput,helperText:o("Enter the new name for the selected list."),id:"name-id",label:o("Name"),onChange:"SET_NAME",path:"data.attributes.name",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{CONNECTION_ADD_CHANGE:l,IF_CONNECTION_SELECTED:({$:e})=>{var a;return s((a=e.getComponent("connection-id"))==null?void 0:a.value)},REFETCH_LIST:({$:e})=>i(e),SET_LIST:n("list"),SET_NAME:n("name"),SET_CONNECTION:async({$:e,e:a})=>{n("connectionId")({$:e,e:a}),await i(e)},ON_MACHINE_LOAD:async({$:e})=>{var a;r(e,[{db:"connectionId",id:"connection-id"},{db:"list",id:"list-id"},{db:"name",id:"name-id"}]),(a=e.db)!=null&&a.connectionId&&await i(e)}}}));export{T as default};
