import{j as e}from"./app-DP6lEqpE.js";import{A as m}from"./AppLayout-DveQsGoq.js";const x=[0,1,2,3,4,5,6];function f({schedules:l,todayDayOfWeek:t,days:c}){const i={};for(const r of l)i[r.day]||(i[r.day]=[]),i[r.day].push(r);const n=x.filter(r=>i[r]&&i[r].length>0);return e.jsx(m,{title:"برنامه هفتگی",children:e.jsxs("div",{className:"page-stack",children:[e.jsx("section",{className:"section-header",children:e.jsxs("div",{children:[e.jsxs("h2",{children:[e.jsx("i",{className:"bi bi-calendar2-week",style:{marginLeft:"0.5rem",color:"var(--color-primary)"}}),"برنامه هفتگی"]}),e.jsx("p",{children:"برنامه کلاسی هفتگی شما"})]})}),l.length===0?e.jsx("section",{className:"panel-card",children:e.jsxs("div",{style:{textAlign:"center",padding:"2rem 1rem"},children:[e.jsx("div",{className:"icon-badge",style:{width:56,height:56,fontSize:"1.5rem",margin:"0 auto 1rem"},children:e.jsx("i",{className:"bi bi-calendar2-week"})}),e.jsx("h2",{children:"برنامه‌ای ثبت نشده"}),e.jsx("p",{children:"هنوز برنامه هفتگی برای کلاس شما تنظیم نشده است."})]})}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:n.map(r=>{const s=r===t,o=i[r]??[];return e.jsxs("section",{className:"panel-card",style:{borderColor:s?"var(--color-primary)":void 0,background:s?"var(--color-primary-soft)":void 0},children:[e.jsxs("h3",{style:{margin:"0 0 0.75rem",display:"flex",alignItems:"center",gap:"0.5rem",color:s?"var(--color-primary-active)":void 0},children:[e.jsx("i",{className:`bi ${s?"bi-calendar-check-fill":"bi-calendar2"}`}),c[r]??`روز ${r}`,s&&e.jsx("span",{className:"badge badge-success",style:{fontSize:"0.72rem"},children:"امروز"})]}),e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.5rem"},children:o.map((a,d)=>e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"0.75rem",padding:"0.6rem 0.9rem",background:s?"white":"var(--color-bg-muted)",borderRadius:"var(--radius-sm)",border:`1px solid ${s?"var(--color-primary-soft)":"var(--color-border)"}`},children:[e.jsxs("span",{style:{direction:"ltr",fontVariantNumeric:"tabular-nums",fontSize:"0.82rem",color:"var(--color-text-muted)",minWidth:80,flexShrink:0},children:[a.startsAt," – ",a.endsAt]}),e.jsxs("div",{style:{flex:1},children:[e.jsx("span",{style:{fontWeight:600,fontSize:"0.95rem"},children:a.subject}),a.classroom!=="—"&&e.jsxs("span",{style:{fontSize:"0.8rem",color:"var(--color-text-muted)",marginRight:"0.5rem"},children:["(",a.classroom,")"]})]}),a.teacher!=="—"&&e.jsxs("span",{style:{fontSize:"0.82rem",color:"var(--color-text-muted)",flexShrink:0},children:[e.jsx("i",{className:"bi bi-person-workspace",style:{marginLeft:"0.25rem"}}),a.teacher]})]},d))})]},r)})})]})})}export{f as default};
