import{c as a,u as f,g as $,e as w,h as y,i as D,k as E,j as N,t as P,b as j,T as F,v as M}from"./index-DoPpOINE.js";import{r as n}from"./vendor-DJo4KD8w.js";import{T as V}from"./ToolbarPanels-CjWlSOUC.js";import{u as R}from"./i18n-BbpF47i1.js";import"./routing-o1npPvOW.js";import"./XMarkIcon-KMKD47CF.js";function H(){var i;const{t:u}=R(),e=(t,o)=>u(`AdminUsers.${t}`,o),c=(i=a(f().activeSession$))==null?void 0:i.client,d=$(),s=w(()=>M(c,d)),m=a(s.browse.activePanel$)??null,U=a(s.users$)??[],g=a(s.stats$)??null,h=a(s.usersLoading$)??!0,b=a(s.statsLoading$)??!0,{theme:p,setTheme:r}=y(),{showLineNumbers:v,toggleLineNumbers:l}=D(),C=n.useCallback(({theme:t})=>{r(t)},[r]),L=n.useCallback(()=>{l()},[l]);E({"settings:theme-changed":C,"settings:line-numbers-toggled":L});const k=n.useCallback(async(t,o)=>{try{await s.updateUser(t,o)}catch(T){console.error("Failed to update user:",T)}},[s]),A=n.useCallback(async t=>{console.warn("Delete user not implemented:",t),alert("Delete user functionality is not currently available")},[]),x=n.useCallback(()=>{console.log("Add user clicked")},[]),S=n.useCallback(()=>{console.log("Export users clicked")},[]);return N.jsx(P,{users:U,userStats:g,isLoadingUsers:h,isLoadingStats:b,onUpdateUser:k,onDeleteUser:A,onAddUser:x,onExportUsers:S,theme:p,showLineNumbers:v,activePanel:m,translations:{title:e("title"),subtitle:e("subtitle"),addUser:e("addUser"),totalUsers:e("totalUsers"),activeUsers:e("activeUsers"),administrators:e("administrators"),recentUsers:e("recentUsers"),searchUsers:e("searchUsers"),searchPlaceholder:e("searchPlaceholder"),role:e("role"),allRoles:e("allRoles"),admin:e("admin"),user:e("user"),status:e("status"),allStatus:e("allStatus"),active:e("active"),inactive:e("inactive"),exportUsers:e("exportUsers"),loadingUsers:e("loadingUsers"),userColumn:e("userColumn"),domainColumn:e("domainColumn"),roleColumn:e("roleColumn"),statusColumn:e("statusColumn"),lastLoginColumn:e("lastLoginColumn"),joinedColumn:e("joinedColumn"),actionsColumn:e("actionsColumn"),noUsersFound:e("noUsersFound"),noUsersFoundDescription:e("noUsersFoundDescription"),noName:e("noName"),never:e("never"),removeAdmin:e("removeAdmin"),makeAdmin:e("makeAdmin"),deactivateUser:e("deactivateUser"),activateUser:e("activateUser"),deleteUser:e("deleteUser")},ToolbarPanels:V,Toolbar:F,buttonStyles:j})}export{H as default};
//# sourceMappingURL=client-B-MtBLP9.js.map
