import{a as p}from"./chunk-43KHYR6B.js";import{e as u}from"./chunk-ZIESS5PK.js";import{H as o,Jc as m,V as l,Z as c,ca as s,l as i,ua as d}from"./chunk-QXTL7CSW.js";import{a}from"./chunk-DAQOROHW.js";var v=class n{router=s(u);authService=s(p);currentUser=d(null);initials=m(()=>(this.currentUser()?.name||"").split(" ").map(e=>e[0]).join("").toUpperCase());logout(){console.log("Logging out..."),this.authService.logout()}mockUsers=[{id:"1",tenantId:"tenant-a",name:"Alice Johnson",email:"alice@example.com",role:"Admin",status:"Active",avatarUrl:"",lastLogin:void 0},{id:"123",tenantId:"tenant-b",name:"John Doe",email:"john.doe@techcorp.com",role:"Editor",status:"Active",avatarUrl:"",lastLogin:void 0},{id:"456",tenantId:"tenant-c",name:"Jane Smith",email:"jane.smith@design.io",role:"Viewer",status:"Inactive",avatarUrl:"",lastLogin:void 0}];getUserById(t){let e=this.mockUsers.find(r=>r.id===t);return i(e).pipe(o(1500),l(r=>{r&&this.currentUser.set(r)}))}getUsers(){return i(this.mockUsers).pipe(o(800))}updateProfile(t){this.currentUser.update(e=>e?a(a({},e),t):null)}static \u0275fac=function(e){return new(e||n)};static \u0275prov=c({token:n,factory:n.\u0275fac,providedIn:"root"})};export{v as a};
