"use strict";(()=>{var e={};e.id=5431,e.ids=[5431],e.modules={53524:e=>{e.exports=require("@prisma/client")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},53940:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>g,patchFetch:()=>h,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>x,staticGenerationAsyncStorage:()=>m});var o={};t.r(o),t.d(o,{GET:()=>l,dynamic:()=>u});var n=t(49303),s=t(88716),a=t(60670),p=t(13538),i=t(87070);let u="force-dynamic";async function l(e){try{let{searchParams:r}=new URL(e.url),t=r.get("cnic");if(!t||13!==t.length)return i.NextResponse.json({error:"CNIC must be exactly 13 digits"},{status:400});let o=await p.Z.parent.findUnique({where:{cnic:t},select:{id:!0,name:!0,surname:!0,phone:!0}});if(o)return i.NextResponse.json({found:!0,parent:o});return i.NextResponse.json({found:!1})}catch(e){return console.error("[API] Parent lookup error:",e),i.NextResponse.json({error:"Internal server error"},{status:500})}}let d=new n.AppRouteRouteModule({definition:{kind:s.x.APP_ROUTE,page:"/api/parents/lookup/route",pathname:"/api/parents/lookup",filename:"route",bundlePath:"app/api/parents/lookup/route"},resolvedPagePath:"C:\\School Management System\\Working\\V2\\src\\app\\api\\parents\\lookup\\route.ts",nextConfigOutput:"standalone",userland:o}),{requestAsyncStorage:c,staticGenerationAsyncStorage:m,serverHooks:x}=d,g="/api/parents/lookup/route";function h(){return(0,a.patchFetch)({serverHooks:x,staticGenerationAsyncStorage:m})}},49303:(e,r,t)=>{e.exports=t(30517)},13538:(e,r,t)=>{t.d(r,{Z:()=>n});var o=t(53524);let n=globalThis.prisma??new o.PrismaClient({log:["error"],datasources:{db:{url:process.env.DATABASE_URL}}})}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),o=r.X(0,[8948,7070],()=>t(53940));module.exports=o})();