import{aa as c,ab as l}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as t,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as d,c as m}from"./commons.-tangy-colts-beg-359.js";import{a as i,h as C}from"./machineh-tangy-colts-beg-169.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const f=c(({helpers:n})=>({states:{components:[m(n),{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:a("Select the file to update."),id:"file-id",label:a("File to Update"),onChange:"SELECT_FILE",onRefetch:"REFETCH_FILES",options:[],render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:a("If not specified, the file name will not be changed."),id:"new-file-name",label:a("New Updated File Name"),onChange:"SET_NEW_FILE_NAME",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:o})=>{t("connectionId")({$:e,e:o}),await i(e),C(e,n)},CONNECTION_ADD_CHANGE:d,IF_CONNECTION_SELECTED:({$:e})=>{var o;return l((o=e.getComponent("connection-id"))==null?void 0:o.value)},REFETCH_FILES:({$:e})=>i(e),SELECT_FILE:t("fileId"),SET_NEW_FILE_NAME:t("newFileName"),ON_MACHINE_LOAD:({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"fileId",id:"file-id"},{db:"newFileName",id:"new-file-name"}]),i(e)}}}));export{f as default};
