import{R as c}from"./vendor-ClLR6ncd.js";import{s as f,G as m}from"./lodash-ZyeDnt0e.js";import{q as u,j as i,i as p,f as t,ao as y}from"./index-OtVJl4GC.js";import{a as d}from"./model-DgFcCvKB.js";const l=[];function A(){const e=h();return c.useMemo(()=>Array.isArray(e.data)?e.data.map(({prefix:s})=>s).filter(Boolean):l,[e.data])}const g="ag",b="gruff";function h(){const{username:e}=u();return i(["namespaces"],async s=>{const[o,n]=await Promise.all([p({url:t(s,"namespaces"),params:{type:"any",effective:"false"}}),p({url:t(y({username:e}),"gruff-namespaces")})]);return d("prefix",f(m(o.map(a=>({...a,backendType:g})).concat(n.map(a=>({...a,backendType:b,type:"user",shadowed:!1}))),(a,r)=>a.backendType===r.backendType?!1:a.prefix===r.prefix),"prefix"))})}export{g as a,A as b,b as g,h as u};
