import{aa as E,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{h as n,s as d}from"./machine.-tangy-colts-beg-869.js";import{h as C,c as h}from"./commons.-tangy-colts-beg-359.js";import{f as a,a as l,b as r,h as s}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 p=E(({helpers:o})=>({states:{components:[h(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the file to move."),id:"file-id",label:t("File"),onChange:"SELECT_FILE",onRefetch:"REFETCH_FILES",options:[],render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the drive where to move the file."),id:"drive-id",label:t("Parent Drive"),onChange:"SELECT_DRIVE",onRefetch:"REFETCH_DRIVES",options:[],render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0},{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:t("Select the folder where to move the file."),id:"folder-id",label:t("Parent Folder"),onChange:"SELECT_FOLDER",onRefetch:"REFETCH_FOLDERS",options:[],render:"IF_CONNECTION_SELECTED",showSearch:!0,value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:i})=>{n("connectionId")({$:e,e:i}),await Promise.all([l(e),a(e),r(e)]),s(e,o)},CONNECTION_ADD_CHANGE:C,IF_CONNECTION_SELECTED:({$:e})=>{var i;return c((i=e.getComponent("connection-id"))==null?void 0:i.value)},REFETCH_DRIVES:({$:e})=>r(e),REFETCH_FILES:({$:e})=>l(e),REFETCH_FOLDERS:({$:e})=>a(e),SELECT_DRIVE:n("driveId"),SELECT_FILE:n("fileId"),SELECT_FOLDER:n("folderId"),ON_MACHINE_LOAD:async({$:e})=>{d(e,[{db:"connectionId",id:"connection-id"},{db:"fileId",id:"file-id"},{db:"driveId",id:"drive-id"},{db:"folderId",id:"folder-id"}]),await Promise.all([l(e),a(e),r(e)])}}}));export{p as default};
