import"./DsnmJJEf.js";import{p as R,a as m,b as $,c as u,d as k,g as t,s as v,r as b,t as M,k as o}from"./Dyk1ealw.js";import{d as V,s as y,a as D}from"./DEEYSJdk.js";import{i as h}from"./cYAxD0tk.js";import{e as O}from"./CDBVw774.js";import{s as W}from"./BGzpdNMV.js";import{p as X}from"./BES_pAfq.js";import{g as G}from"./BCu6PYO-.js";import{b as i}from"./DXU0JJLc.js";import{i as n,b as w}from"./CVq-Ik9t.js";import{c as C}from"./DfqTMdwm.js";import{E as F}from"./DsK1QSAS.js";var P=u('<span class="absolute inset-x-0 -bottom-px h-0.5 bg-primary"></span>'),j=u('<button type="button"><!> <!></button>'),q=u('<nav class="flex border-b border-border" aria-label="Users navigation"></nav>');function et(N,_){R(_,!0);const c=o(()=>w.isSuperAdmin),l=o(()=>C("users")||t(c)),x=o(()=>[{id:"users",label:n.t("ADMIN_NEXT.USERS_NAV.USERS"),path:`${i}/users`},{id:"groups",label:n.t("ADMIN_NEXT.USERS_NAV.GROUPS"),path:`${i}/users/groups`,gated:!t(l)},{id:"invitations",label:n.t("ADMIN_NEXT.USERS_NAV.INVITATIONS"),path:`${i}/users/invitations`,gated:!t(l)},{id:"config",label:n.t("ADMIN_NEXT.USERS_NAV.CONFIGURATION"),path:`${i}/users/config`,gated:!t(c)}]),f=o(()=>{const s=X.url.pathname.replace(i,"");return s.startsWith("/users/groups")?"groups":s.startsWith("/users/invit")?"invitations":s.startsWith("/users/config")?"config":"users"}),S=o(()=>t(x).filter(s=>!s.gated));function A(s){G(s)}var p=q();O(p,21,()=>t(S),s=>s.id,(s,e)=>{var a=j(),d=k(a);{var E=r=>{F(r,{get icon(){return t(e).icon},class:"me-1.5 h-4 w-4 shrink-0 text-sm"})};h(d,r=>{t(e).icon&&r(E)})}var g=v(d),I=v(g);{var U=r=>{var T=P();m(r,T)};h(I,r=>{t(f)===t(e).id&&r(U)})}b(a),M(()=>{W(a,1,`relative inline-flex items-center px-4 py-2.5 text-sm font-medium transition-colors
				${t(f)===t(e).id?"text-primary":"text-muted-foreground hover:text-foreground"}`),y(g,` ${t(e).label??""} `)}),D("click",a,()=>A(t(e).path)),m(s,a)}),b(p),m(N,p),$()}V(["click"]);export{et as U};
