import{w as g,r as i}from"./index-CfKY7XrC.js";function o(){const{data:r,isPending:s}=g(),[n,a]=i.useState(""),e=i.useMemo(()=>r?r.filter(t=>t.is_member).map(t=>({id:t.id,name:t.name,slug:t.slug})):[],[r]);return i.useEffect(()=>{n||s||e.length===0||e.length===1&&a(e[0].id)},[e,s,n]),{orgList:e,selectedOrgId:n,setSelectedOrgId:a,orgsLoading:s}}export{o as u};
