exports.id=8977,exports.ids=[8977],exports.modules={77215:(e,t,a)=>{Promise.resolve().then(a.t.bind(a,92481,23)),Promise.resolve().then(a.bind(a,96464))},33265:(e,t,a)=>{"use strict";a.d(t,{default:()=>n.a});var s=a(43353),n=a.n(s)},43353:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let s=a(91174);a(10326),a(17577);let n=s._(a(77028));function l(e,t){var a;let s={loading:e=>{let{error:t,isLoading:a,pastDelay:s}=e;return null}};"function"==typeof e&&(s.loader=e);let l={...s,...t};return(0,n.default)({...l,modules:null==(a=l.loadableGenerated)?void 0:a.modules})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},933:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let s=a(94129);function n(e){let{reason:t,children:a}=e;throw new s.BailoutToCSRError(t)}},77028:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let s=a(10326),n=a(17577),l=a(933),r=a(46618);function i(e){return{default:e&&"default"in e?e.default:e}}let d={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},o=function(e){let t={...d,...e},a=(0,n.lazy)(()=>t.loader().then(i)),o=t.loading;function c(e){let i=o?(0,s.jsx)(o,{isLoading:!0,pastDelay:!0,error:null}):null,d=t.ssr?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.PreloadCss,{moduleIds:t.modules}),(0,s.jsx)(a,{...e})]}):(0,s.jsx)(l.BailoutToCSR,{reason:"next/dynamic",children:(0,s.jsx)(a,{...e})});return(0,s.jsx)(n.Suspense,{fallback:i,children:d})}return c.displayName="LoadableComponent",c}},46618:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PreloadCss",{enumerable:!0,get:function(){return l}});let s=a(10326),n=a(55403);function l(e){let{moduleIds:t}=e,a=(0,n.getExpectedRequestStore)("next/dynamic css"),l=[];if(a.reactLoadableManifest&&t){let e=a.reactLoadableManifest;for(let a of t){if(!e[a])continue;let t=e[a].files.filter(e=>e.endsWith(".css"));l.push(...t)}}return 0===l.length?null:(0,s.jsx)(s.Fragment,{children:l.map(e=>(0,s.jsx)("link",{precedence:"dynamic",rel:"stylesheet",href:a.assetPrefix+"/_next/"+encodeURI(e),as:"style"},e))})}},9457:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>d});var s=a(19510),n=a(89948),l=a(28345),r=a(17710),i=a(57371);function d({children:e}){return(0,s.jsxs)("div",{className:"min-h-screen flex bg-[#F3F4F6] font-body",children:[(0,s.jsxs)("div",{className:"w-[14%] md:w-[8%] lg:w-[16%] xl:w-[14%] flex flex-col justify-between bg-[#0A1612]/95 backdrop-blur-xl border-r border-white/10 text-white shadow-[0_0_50px_rgba(0,0,0,0.5)] z-50 fixed left-0 top-0 bottom-0 transition-all duration-300",children:[s.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-school-green-900/50 via-transparent to-[#0A1612]/80 pointer-events-none"}),s.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:`linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
              linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px)`,backgroundSize:"30px 30px"}}),s.jsx("div",{className:"relative z-10 p-6 pb-2",children:(0,s.jsxs)(i.default,{href:"/admin",className:"flex items-center justify-center lg:justify-start gap-3 mb-6 p-2 rounded-xl transition-all hover:bg-white/5 group",children:[s.jsx("div",{className:"bg-gradient-to-br from-vibrant-gold/20 to-vibrant-gold/5 p-2.5 rounded-xl backdrop-blur-md border border-vibrant-gold/20 shadow-[0_0_20px_rgba(194,166,61,0.15)] group-hover:scale-105 group-hover:shadow-[0_0_30px_rgba(194,166,61,0.25)] transition-all duration-300",children:s.jsx(r.default,{src:"/logo.png",alt:"logo",width:32,height:32,className:"drop-shadow-md"})}),(0,s.jsxs)("div",{className:"hidden lg:flex flex-col",children:[s.jsx("span",{className:"font-extrabold text-xl tracking-tight text-white leading-none font-display",children:"SCHOOL"}),s.jsx("span",{className:"text-[10px] text-vibrant-gold font-bold tracking-[0.2em] uppercase mt-1 drop-shadow-[0_0_10px_rgba(194,166,61,0.5)]",children:"Admin Panel"})]})]})}),s.jsx("div",{className:"relative z-10 flex-1 overflow-y-auto custom-scrollbar px-1 pb-4",children:s.jsx(n.ZP,{role:"admin"})}),s.jsx("div",{className:"relative z-10 hidden lg:block p-4 text-center border-t border-white/5",children:(0,s.jsxs)("p",{className:"text-[10px] text-white/30 font-mono tracking-wider",children:["v2.0.0 ",s.jsx("span",{className:"text-vibrant-gold/50",children:"Superior"})]})})]}),(0,s.jsxs)("div",{className:"w-[86%] md:w-[92%] lg:w-[84%] xl:w-[86%] ml-[14%] md:ml-[8%] lg:ml-[16%] xl:ml-[14%] flex flex-col bg-[#F3F4F6] relative",children:[s.jsx("div",{className:"absolute top-0 left-0 w-full h-[300px] bg-gradient-to-b from-school-green-100/50 to-transparent pointer-events-none z-0"}),s.jsx("div",{className:"z-10 relative",children:s.jsx(l.Z,{})}),s.jsx("main",{className:"p-6 md:p-8 max-w-[1920px] mx-auto w-full z-10 relative flex-grow",children:e})]})]})}},99294:(e,t,a)=>{"use strict";a.d(t,{Z:()=>i});var s=a(19510),n=a(13538),l=a(93620),r=a(78459);let i=async({table:e,type:t,data:a,id:i})=>{let d={},{userId:o,sessionClaims:c}=(0,r.I)(),u=c?.metadata?.role;if("delete"!==t)switch(e){case"subject":d={teachers:await n.Z.teacher.findMany({select:{id:!0,name:!0,surname:!0}})};break;case"class":let f=await n.Z.sectionGroup.findMany({select:{id:!0,name:!0}}),m=await n.Z.grade.findMany({select:{id:!0,level:!0,sectionGroupId:!0}});d={teachers:await n.Z.teacher.findMany({select:{id:!0,name:!0,surname:!0}}),grades:m,sectionGroups:f};break;case"teacher":let p=await n.Z.subject.findMany({select:{id:!0,name:!0}});d={subjects:p,classes:await n.Z.class.findMany({include:{grade:!0}}),sectionGroups:await n.Z.sectionGroup.findMany({select:{id:!0,name:!0}}),grades:await n.Z.grade.findMany({select:{id:!0,level:!0,sectionGroupId:!0}})};break;case"student":let x=await n.Z.sectionGroup.findMany({select:{id:!0,name:!0,sportsTeacher:{select:{id:!0,name:!0,surname:!0}}}}),b=await n.Z.grade.findMany({select:{id:!0,level:!0,sectionGroupId:!0}});d={classes:await n.Z.class.findMany({include:{_count:{select:{students:!0}},grade:!0,classTeacher:{select:{name:!0,surname:!0}},lessons:{include:{subject:!0,teacher:!0}}}}),grades:b,sectionGroups:x};break;case"exam":d={lessons:await n.Z.lesson.findMany({select:{id:!0,name:!0}})};break;case"resource":d={subjects:await n.Z.subject.findMany({select:{id:!0,name:!0}}),teachers:await n.Z.teacher.findMany({select:{id:!0,name:!0,surname:!0}})};break;case"leave":if("student"===u){let e=await n.Z.student.findUnique({where:{id:o},select:{classId:!0}});d=e?.classId?{teachers:await n.Z.teacher.findMany({where:{OR:[{classTeacherOf:{some:{id:e.classId}}},{lessons:{some:{classId:e.classId}}}]},select:{id:!0,name:!0,surname:!0}})}:{teachers:[]}}else d={students:await n.Z.student.findMany({select:{id:!0,name:!0,surname:!0}})};break;case"message":d={teachers:await n.Z.teacher.findMany({select:{id:!0,name:!0,surname:!0}}),students:await n.Z.student.findMany({select:{id:!0,name:!0,surname:!0}}),parents:await n.Z.parent.findMany({select:{id:!0,name:!0,surname:!0}})};break;case"announcement":d={classes:await n.Z.class.findMany({select:{id:!0,name:!0}})}}return s.jsx("div",{className:"",children:s.jsx(l.ZP,{table:e,type:t,data:a,id:i,relatedData:d})})}}};