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 o,s as m}from"./machine.-tangy-colts-beg-869.js";import{h as u,c as s}from"./commons.-tangy-colts-beg-359.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const T=c(({helpers:n})=>({states:{components:[s(n),{componentName:n.componentName.switch,fieldType:"config",helperText:t("Whether to return all results or only up to a given limit."),id:"return-all",label:t("Return All"),onChange:"SET_RETURN_ALL",render:"IF_CONNECTION_SELECTED",value:!1},{componentName:n.componentName.mixInput,fieldType:"config",helperText:t("Max number of results to return."),id:"limit",label:t("Limit"),onChange:"SET_LIMIT",render:"IF_RETURN_ALL_FALSE",required:!0,value:void 0},{componentName:n.componentName.mixInput,fieldType:"config",helperText:t("Query string for searching shared drives. See the Google Drive API documentation for supported syntax."),id:"query",label:t("Query"),onChange:"SET_QUERY",render:"IF_CONNECTION_SELECTED",value:void 0}]},actions:{CONNECTION_ADD_CHANGE:u,IF_CONNECTION_SELECTED:({$:e})=>{var i;return l((i=e.getComponent("connection-id"))==null?void 0:i.value)},IF_RETURN_ALL_FALSE:({$:e})=>{var r,a;return!((r=e.getComponent("return-all"))==null?void 0:r.value)&&l((a=e.getComponent("connection-id"))==null?void 0:a.value)},SET_CONNECTION:o("connectionId"),SET_LIMIT:o("limit"),SET_QUERY:o("query"),SET_RETURN_ALL:o("returnAll"),ON_MACHINE_LOAD:({$:e})=>{m(e,[{db:"connectionId",id:"connection-id"},{db:"returnAll",id:"return-all"},{db:"limit",id:"limit"},{db:"query",id:"query"}])}}}));export{T as default};
