import{aa as l,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as i}from"./main-tangy-colts-beg.js";import{h as t,s}from"./machine.-tangy-colts-beg-869.js";import{h as d,c as r}from"./commons.-tangy-colts-beg-359.js";import{a,h as E}from"./machineh-tangy-colts-beg-169.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const T=l(({helpers:o})=>({states:{components:[r(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:i("Select the file to get."),id:"file-id",label:i("File"),onChange:"SELECT_FILE",onRefetch:"REFETCH_FILES",options:[],render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.mixInput,fieldType:"config",helperText:i("The fields to return. Leave empty to return all fields. Use comma-separated values like: id, name, mimeType"),id:"fields",label:i("Fields"),onChange:"SET_FIELDS",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:n})=>{t("connectionId")({$:e,e:n}),await a(e),E(e,o)},CONNECTION_ADD_CHANGE:d,IF_CONNECTION_SELECTED:({$:e})=>{var n;return c((n=e.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_FILES:({$:e})=>a(e),SELECT_FILE:t("fileId"),SET_FIELDS:t("fields"),ON_MACHINE_LOAD:({$:e})=>{s(e,[{db:"connectionId",id:"connection-id"},{db:"fileId",id:"file-id"},{db:"fields",id:"fields"}]),a(e)}}}));export{T as default};
