import{j as e,L as t}from"./app-BeXbqfQ0.js";import{A as m}from"./AppLayout-DFlN-unB.js";import{f as r}from"./formatters-CfeoZ7wP.js";function p({metrics:l,importantMessage:a,announcements:n,onlineClasses:i,activeVotingCount:o,approvedGradeCount:c}){return e.jsx(m,{title:"پنل دانش‌آموز",children:e.jsxs("div",{className:"page-stack",children:[a&&e.jsxs("section",{style:{background:"#fef3c7",border:"1px solid #f59e0b",borderRadius:"var(--radius-md)",padding:"1rem 1.25rem"},children:[e.jsxs("strong",{children:[e.jsx("i",{className:"bi bi-megaphone-fill",style:{marginLeft:"0.4rem"}}),"پیام مهم مدرسه"]}),e.jsx("p",{style:{margin:"0.5rem 0 0"},children:a})]}),e.jsxs("section",{className:"dashboard-grid",children:[e.jsxs("article",{className:"metric-card",children:[e.jsx("span",{children:"کلاس‌های امروز"}),e.jsx("strong",{children:r(l.todayClasses)})]}),e.jsxs(t,{href:"/student/exams",className:"metric-card",style:{textDecoration:"none"},children:[e.jsx("span",{children:"امتحان فعال"}),e.jsx("strong",{children:r(l.activeExams)})]}),e.jsxs(t,{href:"/student/homeworks",className:"metric-card",style:{textDecoration:"none"},children:[e.jsx("span",{children:"تکلیف باز"}),e.jsx("strong",{children:r(l.openHomeworks)})]}),e.jsxs(t,{href:"/student/attendance",className:"metric-card",style:{textDecoration:"none"},children:[e.jsx("span",{children:"غیبت ماه"}),e.jsx("strong",{children:r(l.monthAbsences)})]}),c>0&&e.jsxs(t,{href:"/student/grades",className:"metric-card",style:{textDecoration:"none"},children:[e.jsxs("span",{children:[e.jsx("i",{className:"bi bi-patch-check",style:{marginLeft:"0.3rem"}}),"نمرات ثبت‌شده"]}),e.jsx("strong",{children:r(c)})]}),o>0&&e.jsxs(t,{href:"/student/voting",className:"metric-card",style:{textDecoration:"none",borderColor:"var(--color-primary)",background:"var(--color-primary-soft)"},children:[e.jsxs("span",{children:[e.jsx("i",{className:"bi bi-ballot",style:{marginLeft:"0.3rem",color:"var(--color-primary)"}}),"رأی‌گیری فعال"]}),e.jsx("strong",{style:{color:"var(--color-primary-active)"},children:r(o)})]})]}),e.jsxs("section",{className:"split-panel",children:[e.jsxs("article",{className:"panel-card",children:[e.jsxs("h2",{children:[e.jsx("i",{className:"bi bi-megaphone",style:{marginLeft:"0.4rem"}}),"اطلاعیه‌ها"]}),n.length===0?e.jsx("p",{style:{color:"var(--color-text-muted)"},children:"اطلاعیه‌ای برای نمایش وجود ندارد."}):e.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:n.map((s,d)=>e.jsxs("li",{style:{borderBottom:"1px solid var(--color-border)",padding:"0.75rem 0"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.4rem",marginBottom:"0.25rem"},children:[s.isImportant&&e.jsx("span",{className:"badge badge-warning",style:{fontSize:"0.7rem"},children:"مهم"}),e.jsx("strong",{style:{fontSize:"0.95rem"},children:s.title}),e.jsx("span",{style:{color:"var(--color-text-muted)",fontSize:"0.78rem",marginRight:"auto"},children:s.createdAt})]}),e.jsx("p",{style:{margin:0,fontSize:"0.875rem",color:"var(--color-text-muted)"},children:s.body})]},d))})]}),e.jsxs("article",{className:"panel-card",children:[e.jsxs("h2",{children:[e.jsx("i",{className:"bi bi-camera-video",style:{marginLeft:"0.4rem"}}),"کلاس‌های آنلاین"]}),i.length===0?e.jsx("p",{style:{color:"var(--color-text-muted)"},children:"کلاس آنلاین برنامه‌ریزی‌شده‌ای وجود ندارد."}):e.jsx("ul",{style:{listStyle:"none",padding:0,margin:0},children:i.map(s=>e.jsxs("li",{style:{borderBottom:"1px solid var(--color-border)",padding:"0.75rem 0",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("strong",{style:{display:"block"},children:s.title}),e.jsxs("span",{style:{fontSize:"0.85rem",color:"var(--color-text-muted)"},children:[s.subject," — ",s.startsAt]})]}),e.jsxs("a",{href:`/student/online-classes/${s.id}/join`,target:"_blank",rel:"noreferrer",className:"btn btn-primary btn-sm",children:[e.jsx("i",{className:"bi bi-box-arrow-up-left"})," ورود"]})]},s.id))})]})]})]})})}export{p as default};
