import{u as H,i as e,b as v,A as f,m as S,e as j,g as L,s as T,t as a}from"./main-B-KzsHRi.js";import{c as W}from"./service-DriRc7_Z.js";var q=a("<div class=freno-dashboard><div class=freno-welcome><h1>Welcome back, <!>!</h1><p>Here's what's happening with your projects.</p></div><div class=freno-stats-grid><div class=freno-stat-card><div class=freno-stat-value></div><div class=freno-stat-label>Total Projects</div></div><div class=freno-stat-card><div class=freno-stat-value></div><div class=freno-stat-label>Active</div></div><div class=freno-stat-card><div class=freno-stat-value></div><div class=freno-stat-label>Drafts</div></div><div class=freno-stat-card><div class=freno-stat-value></div><div class=freno-stat-label>Shared</div></div></div><div class=freno-section><div class=freno-section-header><h2>Recent Projects</h2></div><div class=freno-project-grid>"),z=a("<div class=freno-empty-state><div class=freno-empty-icon>📝</div><h3>No projects yet</h3><p>Create your first project to start writing collaboratively."),B=a("<div class=freno-project-card-header><h3></h3><span>"),F=a("<p class=freno-project-card-desc>"),G=a("<div class=freno-project-card-footer><div class=freno-collaborators></div><span class=freno-date>"),I=a("<div class=freno-avatar-small>"),J=a("<div class=freno-avatar-more>+");const O=()=>{const x=H(),i=W();return(()=>{var h=q(),$=h.firstChild,p=$.firstChild,y=p.firstChild,_=y.nextSibling;_.nextSibling;var u=$.nextSibling,b=u.firstChild,w=b.firstChild,g=b.nextSibling,P=g.firstChild,m=g.nextSibling,A=m.firstChild,D=m.nextSibling,N=D.firstChild,R=u.nextSibling,c=R.firstChild;c.firstChild;var k=c.nextSibling;return e(p,()=>x().user?.name?.split(" ")[0]||"there",_),e(w,()=>i.projects().length),e(P,()=>i.projects().filter(s=>s.status==="active").length),e(A,()=>i.projects().filter(s=>s.status==="draft").length),e(N,()=>i.projects().filter(s=>s.collaborators.length>0).length),e(c,v(f,{href:"/projects/new",class:"freno-btn freno-btn-primary",children:"+ New Project"}),null),e(k,(()=>{var s=S(()=>i.projects().length===0);return()=>s()?(()=>{var r=z(),t=r.firstChild,l=t.nextSibling;return l.nextSibling,e(r,v(f,{href:"/projects/new",class:"freno-btn freno-btn-primary",children:"Create Project"}),null),r})():i.projects().slice(0,6).map(r=>v(f,{get href(){return`/projects/${r.id}`},class:"freno-project-card",get children(){return[(()=>{var t=B(),l=t.firstChild,o=l.nextSibling;return e(l,()=>r.name),e(o,()=>r.status),j(()=>L(o,`freno-badge freno-badge-${r.status}`)),t})(),(()=>{var t=F();return e(t,()=>r.description),t})(),(()=>{var t=G(),l=t.firstChild,o=l.nextSibling;return e(l,()=>r.collaborators.slice(0,3).map((C,n)=>(()=>{var d=I();return e(d,()=>String.fromCharCode(65+n)),j(E=>T(d,`--i: ${n}`,E)),d})()),null),e(l,(()=>{var C=S(()=>r.collaborators.length>3);return()=>C()&&(()=>{var n=J();return n.firstChild,e(n,()=>r.collaborators.length-3,null),n})()})(),null),e(o,()=>new Date(r.updatedAt).toLocaleDateString()),t})()]}}))})()),h})()};export{O as Dashboard};
//# sourceMappingURL=Dashboard-BufY0tf4.js.map
