"use strict";exports.id=49731,exports.ids=[49731],exports.modules={49731:(a,b,c)=>{c.r(b),c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(19099),g=c(59478),h=c(82697);c(93529),c(91115);let i={PENDING:"Pending",SUBMITTED:"Submitted",CHECKED:"Checked",LATE:"Late",MISSING:"Missing"},j={PENDING:"bg-slate-100 text-slate-700",SUBMITTED:"bg-sky-50 text-sky-800",CHECKED:"bg-emerald-50 text-emerald-800",LATE:"bg-amber-50 text-amber-800",MISSING:"bg-rose-50 text-rose-800"};function k(){let a=(0,f.useParams)();"string"==typeof a?.studentUserId&&a.studentUserId;let[b,c]=(0,e.useState)([]),[k,l]=(0,e.useState)(!0);return(0,d.jsx)(g.R,{title:"Homework",description:"Class assignments and your child's evaluation status.",children:k?(0,d.jsx)("div",{className:"space-y-3 animate-pulse",children:Array.from({length:3}).map((a,b)=>(0,d.jsx)("div",{className:"h-28 rounded-lg bg-slate-100"},b))}):0===b.length?(0,d.jsx)(h.i0,{title:"No homework yet",description:"When teachers assign work to your child's class, it will appear here."}):(0,d.jsx)("ul",{className:"space-y-3",children:b.map(a=>(0,d.jsx)("li",{children:(0,d.jsxs)("div",{className:"rounded-lg border border-slate-100 bg-white p-4 shadow-sm sm:p-5",children:[(0,d.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"font-semibold text-slate-900",children:a.title}),(0,d.jsxs)("p",{className:"mt-1 text-xs text-slate-500",children:[a.subject?.name||"General",a.assignedDate?` \xb7 Assigned ${a.assignedDate}`:"",a.dueDate?` \xb7 Due ${a.dueDate}`:""]})]}),(0,d.jsxs)("span",{className:`rounded-md px-2 py-0.5 text-xs font-semibold ${j[a.myEvaluation.status]||j.PENDING}`,children:[i[a.myEvaluation.status]||a.myEvaluation.status,null!=a.myEvaluation.marks?` \xb7 ${a.myEvaluation.marks}`:""]})]}),a.description?(0,d.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-sm text-slate-600",children:a.description}):null,a.myEvaluation.remarks?(0,d.jsxs)("p",{className:"mt-2 text-sm text-slate-800",children:["Teacher remark: ",a.myEvaluation.remarks]}):null]})},a.id))})})}},93529:(a,b,c)=>{c.d(b,{BT:()=>h,CP:()=>o,OI:()=>k,W6:()=>f,WR:()=>l,hi:()=>j,kN:()=>g,mk:()=>i,n9:()=>n,xw:()=>m});var d=c(23971);function e(a){if(!a.data.success||void 0===a.data.data)throw Error(a.data.message||"Request failed");return a.data.data}async function f(){return e(await d.uE.get("/school/parent/home"))}async function g(a){return e(await d.uE.get(`/school/parent/children/${a}/overview`))}async function h(a){return e(await d.uE.get(`/school/parent/children/${a}/details`))}async function i(a){return e(await d.uE.get(`/school/parent/children/${a}/notices`))}async function j(a){return e(await d.uE.get(`/school/parent/children/${a}/homework`))}async function k(a,b){return e(await d.uE.get(`/school/parent/children/${a}/attendance`,{params:b}))}async function l(a){return e(await d.uE.get(`/school/parent/children/${a}/fees`))}async function m(a){return e(await d.uE.get(`/school/parent/children/${a}/exams`))}async function n(a,b){return e(await d.uE.get(`/school/parent/children/${a}/exam-result`,{params:{examId:b}}))}async function o(){return e(await d.uE.get("/school/parent/holidays"))}}};