import{aa as i,ab as d}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{h as a,s as r}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as E}from"./commons.-tangy-colts-beg-359.js";import{f as l,h}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 _=i(({helpers:o})=>({states:{components:[E(o),{allowClear:!0,componentName:o.componentName.select,fieldType:"config",helperText:n("Select the folder to delete."),id:"folder-id",label:n("Folder"),onChange:"SELECT_FOLDER",onRefetch:"REFETCH_FOLDERS",options:[],render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:o.componentName.switch,fieldType:"config",helperText:n("Whether to delete the folder immediately. If false, the folder will be moved to the trash."),id:"delete-permanently",label:n("Delete Permanently"),onChange:"SET_DELETE_PERMANENTLY",render:"IF_CONNECTION_SELECTED",value:!1}]},actions:{SET_CONNECTION:async({$:e,e:t})=>{a("connectionId")({$:e,e:t}),await l(e),h(e,o)},CONNECTION_ADD_CHANGE:c,IF_CONNECTION_SELECTED:({$:e})=>{var t;return d((t=e.getComponent("connection-id"))==null?void 0:t.value)},REFETCH_FOLDERS:({$:e})=>l(e),SELECT_FOLDER:a("folderId"),SET_DELETE_PERMANENTLY:a("deletePermanently"),ON_MACHINE_LOAD:({$:e})=>{r(e,[{db:"connectionId",id:"connection-id"},{db:"folderId",id:"folder-id"},{db:"deletePermanently",id:"delete-permanently"}]),l(e)}}}));export{_ as default};
