"use strict";exports.id=53560,exports.ids=[53560],exports.modules={53560:(a,b,c)=>{c.r(b),c.d(b,{default:()=>j});var d=c(48249),e=c(67484),f=c(42947),g=c(82697);c(92038),c(91115);var h=c(74741);function i({title:a,children:b}){return(0,d.jsx)(g.cP,{title:a,children:b})}function j(){let[a,b]=(0,e.useState)(null),[c,j]=(0,e.useState)(!0),k=a?.user,l=a?.profile,m=a?.enrollment,n=m?.schoolClass?.displayName,o=(0,h.oG)(k?.profileImage),p=(k?.fullName||"?").split(/\s+/).filter(Boolean).slice(0,2).map(a=>a[0]?.toUpperCase()).join("");return(0,d.jsx)(f.o,{title:"My details",description:"Your admission and contact information on file with the school.",children:c?(0,d.jsxs)("div",{className:"space-y-4 animate-pulse",children:[(0,d.jsx)("div",{className:"h-28 rounded-lg bg-slate-100"}),(0,d.jsx)("div",{className:"h-40 rounded-lg bg-slate-100"}),(0,d.jsx)("div",{className:"h-40 rounded-lg bg-slate-100"})]}):a?(0,d.jsxs)("div",{className:"space-y-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-4 rounded-lg border border-slate-100 bg-white p-5 shadow-sm sm:flex-row sm:items-center",children:[(0,d.jsx)("div",{className:"flex h-16 w-16 shrink-0 items-center justify-center overflow-hidden rounded-full bg-primary-50 text-lg font-semibold text-primary-800",children:k?.profileImage?o?(0,d.jsx)("img",{src:o,alt:"",className:"h-full w-full object-cover"}):null:p}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("p",{className:"text-xl font-semibold text-slate-900",children:k?.fullName||"Student"}),(0,d.jsx)("p",{className:"mt-1 text-sm text-slate-500",children:[n,k?.studentCode?`ID ${k.studentCode}`:null,m?.rollNumber?`Roll ${m.rollNumber}`:null].filter(Boolean).join(" \xb7 ")||"Enrolled student"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,d.jsxs)(i,{title:"Account",children:[(0,d.jsx)(g.CL,{label:"Full name",value:k?.fullName}),(0,d.jsx)(g.CL,{label:"Email",value:k?.email}),(0,d.jsx)(g.CL,{label:"Phone",value:k?.phone}),(0,d.jsx)(g.CL,{label:"Student code",value:k?.studentCode})]}),(0,d.jsxs)(i,{title:"Class & admission",children:[(0,d.jsx)(g.CL,{label:"Class",value:n}),(0,d.jsx)(g.CL,{label:"Roll number",value:m?.rollNumber}),(0,d.jsx)(g.CL,{label:"Admission number",value:l?.admissionNumber}),(0,d.jsx)(g.CL,{label:"Admission date",value:l?.admissionDate}),(0,d.jsx)(g.CL,{label:"Category",value:l?.category?.name}),(0,d.jsx)(g.CL,{label:"Group",value:l?.group?.name}),(0,d.jsx)(g.CL,{label:"Previous school",value:l?.previousSchool})]}),(0,d.jsxs)(i,{title:"Personal",children:[(0,d.jsx)(g.CL,{label:"Date of birth",value:l?.dateOfBirth}),(0,d.jsx)(g.CL,{label:"Gender",value:l?.gender}),(0,d.jsx)(g.CL,{label:"Blood group",value:l?.bloodGroup}),(0,d.jsx)(g.CL,{label:"Address",value:l?.address}),(0,d.jsx)(g.CL,{label:"City",value:l?.city}),(0,d.jsx)(g.CL,{label:"District",value:l?.district}),(0,d.jsx)(g.CL,{label:"Country",value:l?.country})]}),(0,d.jsxs)(i,{title:"Parents & guardian",children:[(0,d.jsx)(g.CL,{label:"Father",value:l?.fatherName}),(0,d.jsx)(g.CL,{label:"Father phone",value:l?.fatherPhone}),(0,d.jsx)(g.CL,{label:"Father email",value:l?.fatherEmail}),(0,d.jsx)(g.CL,{label:"Mother",value:l?.motherName}),(0,d.jsx)(g.CL,{label:"Mother phone",value:l?.motherPhone}),(0,d.jsx)(g.CL,{label:"Mother email",value:l?.motherEmail}),(0,d.jsx)(g.CL,{label:"Guardian",value:l?.guardianName}),(0,d.jsx)(g.CL,{label:"Guardian relation",value:l?.guardianRelation?`${l.guardianRelation}${l.guardianPhone?` \xb7 ${l.guardianPhone}`:""}`:l?.guardianPhone})]})]})]}):(0,d.jsx)(g.i0,{title:"Could not load your record",description:"Ask your school office if you need help accessing your student profile."})})}}};