import"./DsnmJJEf.js";import{p as U,a as u,b as E,c as m,d as I,s as T,g as t,r as g,t as R,h as a}from"./krC2xWPP.js";import{d as $,s as M,a as V}from"./CddAxf8c.js";import{i as y}from"./DjsWWzyL.js";import{e as D}from"./Lvd_r9sp.js";import{s as O}from"./j_DJpx8B.js";import{p as W}from"./euuZp6ft.js";import{g as X}from"./BVTiZ3e2.js";import{b as e}from"./BSopV7IU.js";import{i,c as k}from"./Cu5ilWky.js";import{c as G}from"./CuDfWLaU.js";var C=m(''),F=m(''),P=m('');function Z(v,b){U(b,!0);const l=a(()=>k.isSuperAdmin),c=a(()=>G("users")||t(l)),h=a(()=>[{id:"users",label:i.t("ADMIN_NEXT.USERS_NAV.USERS"),path:`${e}/users`},{id:"groups",label:i.t("ADMIN_NEXT.USERS_NAV.GROUPS"),path:`${e}/users/groups`,gated:!t(c)},{id:"invitations",label:i.t("ADMIN_NEXT.USERS_NAV.INVITATIONS"),path:`${e}/users/invitations`,gated:!t(c)},{id:"config",label:i.t("ADMIN_NEXT.USERS_NAV.CONFIGURATION"),path:`${e}/users/config`,gated:!t(l)}]),d=a(()=>{const s=W.url.pathname.replace(e,"");return s.startsWith("/users/groups")?"groups":s.startsWith("/users/invite")?"invitations":s.startsWith("/users/config")?"config":"users"}),N=a(()=>t(h).filter(s=>!s.gated));function _(s){X(s)}var n=P();D(n,21,()=>t(N),s=>s.id,(s,o)=>{var r=F(),f=I(r),S=T(f);{var x=p=>{var A=C();u(p,A)};y(S,p=>{t(d)===t(o).id&&p(x)})}g(r),R(()=>{O(r,1,`relative px-4 py-2.5 text-sm font-medium transition-colors
${t(d)===t(o).id?"text-primary":"text-muted-foreground hover:text-foreground"}`),M(f,`${t(o).label??""} `)}),V("click",r,()=>_(t(o).path)),u(s,r)}),g(n),u(v,n),E()}$(["click"]);export{Z as U};