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"./qex-fw8l.js";import{d as V,s as y,a as D}from"./vzbhwc8t.js";import{i as h}from"./BnUrxEZg.js";import{e as O}from"./HL7kq492.js";import{s as W}from"./CoLYeqRS.js";import{p as X}from"./Dmsi5yYR.js";import{g as G}from"./XKwVQUgR.js";import{b as i}from"./dG3E5dY6.js";import{i as n,b as w}from"./dc0o8kHW.js";import{c as C}from"./pW8WuSdk.js";import{E as F}from"./DPHzOARe.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};
