"use strict";exports.id=32231,exports.ids=[32231,67183,89564],exports.modules={32231:(a,b,c)=>{c.r(b),c.d(b,{default:()=>k});var d=c(48249),e=c(67484),f=c(89564),g=c(63754),h=c(82697);c(24403);var i=c(40433),j=c(74741);function k(){let[a,b]=(0,e.useState)([]),[c,k]=(0,e.useState)(""),[l,m]=(0,e.useState)([]),[n,o]=(0,e.useState)(!0),p=a.find(a=>a.id===c);return(0,d.jsx)(g.V,{title:"My students",description:"Students in the class sections you are assigned to teach.",children:n?(0,d.jsx)("div",{className:"h-40 animate-pulse rounded-lg bg-slate-100"}):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:"Class"}),(0,d.jsx)("select",{value:c,onChange:a=>k(a.target.value),className:"block w-full min-h-[44px] rounded-md border border-slate-200 bg-white px-3 py-2 text-sm text-slate-900",children:a.map(a=>(0,d.jsx)("option",{value:a.id,children:a.displayName},a.id))})]})}),l.length?(0,d.jsx)("div",{className:"overflow-hidden rounded-lg border border-slate-100 bg-white shadow-sm",children:(0,d.jsx)("ul",{className:"divide-y divide-slate-100",children:l.map(a=>{let b=(0,j.oG)(a.profileImage),c=a.fullName.split(/\s+/).filter(Boolean).slice(0,2).map(a=>a[0]?.toUpperCase()).join("");return(0,d.jsxs)("li",{className:"flex items-center gap-3 px-4 py-3 sm:px-5",children:[(0,d.jsx)("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center overflow-hidden rounded-full bg-slate-100 text-sm font-semibold text-slate-600",children:b?(0,d.jsx)("img",{src:b,alt:"",className:"h-full w-full object-cover"}):c}),(0,d.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,d.jsx)(f.j,{href:`${i.bw.SMS_TEACHER.STUDENTS}/${a.userId}`,className:"font-medium text-slate-900 hover:text-primary-700 hover:underline",children:a.fullName}),(0,d.jsx)("p",{className:"text-xs text-slate-500",children:[a.rollNumber?`Roll ${a.rollNumber}`:null,a.studentCode,a.email].filter(Boolean).join(" \xb7 ")})]})]},a.userId)})})}):(0,d.jsx)(h.i0,{title:"No students in this class",description:`${p?.displayName||"This class"} has no active enrollments yet.`})]}):(0,d.jsx)(h.i0,{title:"No class assigned",description:"Your school admin must assign you as class teacher before you can view students."})})}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})))}})}}};