import{aa as r,ab as i}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as t,s as l}from"./machine.-tangy-colts-beg-869.js";import{h as c,c as s}from"./dropboxc-tangy-colts-beg-404.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,n){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,n),n)}};const _=r(({helpers:a})=>({states:{components:[s(a),{componentName:a.componentName.mixInput,fieldType:"config",helperText:e("Enter the search query to find files and folders."),id:"search-query",label:e("Search Query"),onChange:"SET_SEARCH_QUERY",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:a.componentName.mixInput,fieldType:"config",helperText:e("Enter the path to search within (e.g., /Documents). Leave empty to search all files."),id:"search-path",label:e("Search Path"),onChange:"SET_SEARCH_PATH",render:"IF_CONNECTION_SELECTED",required:!1,value:void 0},{componentName:a.componentName.select,fieldType:"config",helperText:e("Select the search mode."),id:"search-mode",label:e("Search Mode"),onChange:"SET_SEARCH_MODE",options:[{label:e("Filename Only"),value:"filename"},{label:e("Filename and Content"),value:"filename_and_content"},{label:e("Deleted Filename"),value:"deleted_filename"}],render:"IF_CONNECTION_SELECTED",value:"filename"},{componentName:a.componentName.mixInput,fieldType:"config",helperText:e("Enter the maximum number of results to return (default: 100)."),id:"max-results",label:e("Max Results"),onChange:"SET_MAX_RESULTS",render:"IF_CONNECTION_SELECTED",required:!1,value:void 0}]},actions:{SET_CONNECTION:t("connection"),IF_CONNECTION_SELECTED:({$:n})=>{var o;return i((o=n.getComponent("connection-id"))==null?void 0:o.value)},CONNECTION_ADD_CHANGE:c,SET_SEARCH_QUERY:t("searchQuery"),SET_SEARCH_PATH:t("searchPath"),SET_SEARCH_MODE:t("searchMode"),SET_MAX_RESULTS:t("maxResults"),ON_MACHINE_LOAD:({$:n})=>{l(n,[{db:"connection",id:"connection-id"},{db:"searchQuery",id:"search-query"},{db:"searchPath",id:"search-path"},{db:"searchMode",id:"search-mode"},{db:"maxResults",id:"max-results"}])}}}));export{_ as default};
