import{r as m,q as f}from"./main-few-lands-burn.js";import{u as d}from"./useflows-BpG3C9m1.js";import{u as l}from"./utilscss-IoKwGUy7.js";import{u as p}from"./index-ubWv-fhI.js";import{c as q}from"./mutative-C6xjlr6O.js";function S(n,a,c){const t=l(e=>e.setupModal.id),{data:o,isFetching:s,isLoading:i,refetch:u}=p({enabled:c,queryFn:()=>f("connections",{appSlug:n},void 0,"POST"),queryKey:["connections",n||"all","all"],select:e=>e.data||[],staleTime:10*1e3});return m.useEffect(()=>{t&&d.getState().actions.setNodeData(t,e=>q(e,r=>{r.states&&(r.states.connections=o)}))},[o,a,t]),{connections:o??[],isConnectionFetching:s,isConnectionLoading:i,isFetching:s,isLoading:i,refetch:u}}export{S as u};
