"use strict";exports.id=32788,exports.ids=[32788],exports.modules={32788:(a,b,c)=>{c.r(b),c.d(b,{default:()=>l});var d=c(48249),e=c(67484),f=c(19099),g=c(59478),h=c(82697),i=c(48935),j=c(40433),k=c(91115);function l(){let a=(0,f.useRouter)(),[b,c]=(0,e.useState)(""),[l,m]=(0,e.useState)(!1),n=async c=>{c.preventDefault();let d=b.trim();if(d){m(!0);try{let b=await (0,i.az)(d);(0,k.Te)(`Linked ${b.fullName||"student"} successfully`),a.push(j.bw.SMS_PARENT.child(b.id))}catch(a){(0,k.Qg)(a instanceof Error?a.message:"Could not link child")}finally{m(!1)}}};return(0,d.jsx)(g.R,{title:"Link a child",description:"Connect your parent account to your child's school record using their student code.",children:(0,d.jsxs)("form",{onSubmit:n,className:"mx-auto max-w-md space-y-4 rounded-lg border border-slate-100 bg-white p-5 shadow-sm",children:[(0,d.jsx)(h.yB,{label:"Student code",children:(0,d.jsx)("input",{value:b,onChange:a=>c(a.target.value.toUpperCase()),className:h.Mg,placeholder:"From admission letter or school office",required:!0})}),(0,d.jsx)("button",{type:"submit",disabled:l,className:"inline-flex min-h-[44px] w-full items-center justify-center rounded-md bg-primary-700 px-4 py-2 text-sm font-medium text-white hover:bg-primary-800 disabled:opacity-50",children:l?"Linking…":"Link child"})]})})}}};