import{aa as c,ab as l}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{h as i,s as E}from"./machine.-tangy-colts-beg-869.js";import{h as m,c as d}from"./commons.-tangy-colts-beg-359.js";import{a,h as r}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 N=c(({helpers:o})=>({states:{components:[d(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the file to download."),id:"file-id",label:t("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:t("MIME type for Google Docs conversion. For Google Docs use: text/html, application/pdf, etc."),id:"mime-type",label:t("MIME Type"),onChange:"SET_MIME_TYPE",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:n})=>{i("connectionId")({$:e,e:n}),await a(e),r(e,o)},CONNECTION_ADD_CHANGE:m,IF_CONNECTION_SELECTED:({$:e})=>{var n;return l((n=e.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_FILES:({$:e})=>a(e),SELECT_FILE:i("fileId"),SET_MIME_TYPE:i("mimeType"),ON_MACHINE_LOAD:({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"fileId",id:"file-id"},{db:"mimeType",id:"mime-type"}]),a(e)}}}));export{N as default};
