1import{u as j,ad as u,j as e}from"./index-BZvCw4oa.js";import{c as g,r as n,L as l}from"./react-vendor-DqA3VcgO.js";import"./firebase-core-B9sY9DWQ.js";import"./firebase-firestore-BNZicn4D.js";import"./firebase-storage-65opq_5Y.js";import"./monitoring-BjoSL1Hg.js";const a={background:"var(--color-surface, #fff)",borderRadius:12,padding:"18px 20px",boxShadow:"0 1px 4px rgba(0,0,0,0.06)",border:"1px solid var(--color-border, #e2e8f0)"};function W(){const{logout:d}=j(),c=g(),[i,x]=n.useState([]),[h,p]=n.useState(!0),[o,m]=n.useState(null);return n.useEffect(()=>{let t=!1;return u().then(s=>{t||x(s)}).catch(s=>{t||m(s.message)}).finally(()=>{t||p(!1)}),()=>{t=!0}},[]),e.jsxs("div",{className:"admin-page",children:[e.jsxs("div",{className:"admin-header",children:[e.jsxs("div",{children:[e.jsx(l,{to:"/admin",className:"back-link",children:"â Ø§ÙØ±Ø¦ÙØ³ÙØ©"}),e.jsx("h1",{children:"Ø¥ØØµØ§Ø¦Ùات اÙÙ ÙØ§Ø¯"})]}),e.jsx("button",{className:"btn btn-secondary",onClick:async()=>{await d(),c("/login")},children:"تسجÙÙ Ø®Ø±ÙØ¬"})]}),h?e.jsx("p",{className:"loading-text",children:"جار٠تØÙ ÙÙ Ø§ÙØ¥ØØµØ§Ø¦Ùات..."}):o?e.jsx("p",{style:{color:"#dc2626",textAlign:"center",padding:20},children:o}):i.length===0?e.jsx("p",{className:"empty-text",children:"ÙØ§ ØªÙØ¬Ø¯ Ù ÙØ§Ø¯."}):e.jsx("div",{style:{display:"grid",gap:16},children:i.map(t=>{const s=t.enrolled>0?Math.round(t.started/t.enrolled*100):0,f=t.enrolled>0?Math.round(t.completed/t.enrolled*100):0;return e.jsx(l,{to:`/admin/subject-stats/${t.id}`,style:{textDecoration:"none",color:"inherit"},children:e.jsxs("div",{style:{...a,cursor:"pointer",transition:"box-shadow 0.2s, transform 0.15s"},onMouseEnter:r=>{r.currentTarget.style.boxShadow="0 4px 16px rgba(0,0,0,0.12)",r.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:r=>{r.currentTarget.style.boxShadow=a.boxShadow,r.currentTarget.style.transform="none"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[e.jsx("h3",{style:{margin:0,fontSize:"1.1rem",fontWeight:700},children:t.name}),e.jsx("span",{style:{color:"#9ca3af",fontSize:"1.1rem"},children:"â"})]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(130px, 1fr))",gap:"10px 16px",fontSize:"0.88rem"},children:[e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"اÙ٠سجÙÙÙ"}),e.jsx("div",{style:{fontWeight:600,fontSize:"1rem"},children:t.enrolled})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"اÙÙØ´Ø·ÙÙ (7 Ø£ÙØ§Ù )"}),e.jsx("div",{style:{fontWeight:600,fontSize:"1rem"},children:t.active})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"Ø¨Ø¯Ø£ÙØ§"}),e.jsxs("div",{style:{fontWeight:600,fontSize:"1rem"},children:[t.started," ",e.jsxs("span",{style:{color:"#9ca3af",fontSize:"0.82rem"},children:["(",s,"%)"]})]})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"Ø£ÙÙ ÙÙØ§"}),e.jsxs("div",{style:{fontWeight:600,fontSize:"1rem"},children:[t.completed," ",e.jsxs("span",{style:{color:"#9ca3af",fontSize:"0.82rem"},children:["(",f,"%)"]})]})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"Ø§ÙØ±ØÙات"}),e.jsx("div",{style:{fontWeight:600,fontSize:"1rem"},children:t.journeyCount})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#6b7280"},children:"Ø§ÙØ¨Ø·Ø§Ùات"}),e.jsx("div",{style:{fontWeight:600,fontSize:"1rem"},children:t.totalCards})]})]})]})},t.id)})})]})}export{W as default}; 2//# sourceMappingURL=SubjectStats-27MfGqeE.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.