"use strict";exports.id=46333,exports.ids=[46333,67183,89564],exports.modules={46333:(a,b,c)=>{c.r(b),c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(89564),g=c(63754),h=c(82697);c(24403);var i=c(40433);function j(){let[a,b]=(0,e.useState)([]),[c,j]=(0,e.useState)(""),[k,l]=(0,e.useState)([]),[m,n]=(0,e.useState)(!0);return(0,d.jsx)(g.V,{title:"Homework",description:"Create assignments and evaluate student work.",actions:a.length?(0,d.jsx)(h.u,{href:i.bw.SMS_TEACHER.HOMEWORK_NEW,children:"Add homework"}):null,children:a.length?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"rounded-lg border border-slate-100 bg-white p-4 shadow-sm",children:(0,d.jsxs)("label",{className:"block text-sm",children:[(0,d.jsx)("span",{className:"mb-1 block text-slate-500",children:"Filter by class"}),(0,d.jsx)("select",{value:c,onChange:a=>j(a.target.value),className:"block w-full min-h-[44px] rounded-md border border-slate-200 px-3 py-2 text-sm",children:a.map(a=>(0,d.jsx)("option",{value:a.id,children:a.displayName},a.id))})]})}),m?(0,d.jsx)("div",{className:"space-y-3 animate-pulse",children:Array.from({length:3}).map((a,b)=>(0,d.jsx)("div",{className:"h-24 rounded-lg bg-slate-100"},b))}):k.length?(0,d.jsx)("ul",{className:"space-y-3",children:k.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.schoolClass?.displayName||"Class",a.subject?.name?` \xb7 ${a.subject.name}`:"",a.dueDate?` \xb7 Due ${a.dueDate}`:""]})]}),(0,d.jsx)("span",{className:"rounded-md bg-slate-100 px-2 py-0.5 text-xs font-semibold text-slate-700",children:a.status})]}),(0,d.jsx)("div",{className:"mt-3",children:(0,d.jsx)(f.j,{href:`${i.bw.SMS_TEACHER.HOMEWORK_EVAL}?homeworkId=${a.id}`,className:"text-sm font-medium text-primary-700 hover:underline",children:"Evaluate students"})})]})},a.id))}):(0,d.jsx)(h.i0,{title:"No homework yet",description:"Create homework for your class so students can see it in their portal.",action:(0,d.jsx)(h.u,{href:i.bw.SMS_TEACHER.HOMEWORK_NEW,children:"Add homework"})})]}):(0,d.jsx)(h.i0,{title:"No class assigned",description:"Assign yourself as class teacher to create homework for your class."})})}c(91115)},89564:(a,b,c)=>{c.d(b,{j:()=>l});var d=c(48249),e=c(2116),f=c.n(e),g=c(18954),h=c(17060),i=c(89513);function j(a){return(a.split("?")[0]||a).replace(/\/$/,"")||"/"}function k(a){if("string"==typeof a)return a;if(a&&"object"==typeof a){let b=a.pathname?String(a.pathname):"",c=a.search?String(a.search):"",d=a.hash?String(a.hash):"";return`${b}${c}${d}`}return""}function l({href:a,onClick:b,prefetch:c=!1,scroll:e=!0,...l}){let m=(0,h.sK)(),n=k(a),o=j(k(a)),p=m??"",q=o?(0,i.C)(o):null;return(0,d.jsx)(f(),{href:a,prefetch:c,scroll:e,...l,onClick:a=>{b?.(a),!a.defaultPrevented&&o&&(j(p)===j(o)?a.preventDefault():q&&(a.preventDefault(),(0,g.$)(n,{scroll:e})))}})}}};