(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2400],{87907:function(e,t,r){Promise.resolve().then(r.bind(r,86341)),Promise.resolve().then(r.bind(r,90938))},66648:function(e,t,r){"use strict";r.d(t,{default:function(){return s.a}});var a=r(55601),s=r.n(a)},16463:function(e,t,r){"use strict";var a=r(71169);r.o(a,"useParams")&&r.d(t,{useParams:function(){return a.useParams}}),r.o(a,"usePathname")&&r.d(t,{usePathname:function(){return a.usePathname}}),r.o(a,"useRouter")&&r.d(t,{useRouter:function(){return a.useRouter}}),r.o(a,"useSearchParams")&&r.d(t,{useSearchParams:function(){return a.useSearchParams}})},55601:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return i},getImageProps:function(){return o}});let a=r(99920),s=r(80497),n=r(38173),l=a._(r(21241));function o(e){let{props:t}=(0,s.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return{props:t}}let i=n.Image},86341:function(e,t,r){"use strict";var a=r(57437);t.default=e=>{var t,r;let{room:s}=e,n=s._count.students,l=s.capacity,o=n/l*100,i="bg-green-500",c="bg-green-50 text-green-700 border-green-100";return o>=100?(i="bg-red-500",c="bg-red-50 text-red-700 border-red-100"):o>=80&&(i="bg-yellow-500",c="bg-yellow-50 text-yellow-700 border-yellow-100"),(0,a.jsxs)("div",{className:"bg-white rounded-2xl p-5 border border-gray-100 shadow-sm hover:shadow-lg transition-all duration-300 group relative overflow-hidden",children:[(0,a.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 rounded-bl-full opacity-10 transition-colors ".concat(i)}),(0,a.jsxs)("div",{className:"flex justify-between items-start mb-4 relative z-10",children:[(0,a.jsx)("div",{className:"w-12 h-12 bg-gray-50 rounded-xl flex items-center justify-center text-lg font-bold text-gray-700 border border-gray-100",children:s.name}),(0,a.jsx)("div",{className:"px-2 py-1 rounded text-[10px] font-bold uppercase tracking-wide border ".concat(c),children:o>=100?"Full":"Available"})]}),(0,a.jsxs)("div",{className:"space-y-4 relative z-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-xs text-gray-400 font-semibold uppercase tracking-wider mb-1",children:"Class Teacher"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-blue-100 flex items-center justify-center text-[10px] text-blue-600 font-bold",children:(null===(r=s.classTeacher)||void 0===r?void 0:null===(t=r.name)||void 0===t?void 0:t[0])||"?"}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-700",children:s.classTeacher?"".concat(s.classTeacher.name," ").concat(s.classTeacher.surname):"Unassigned"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex justify-between text-xs font-semibold mb-1.5",children:[(0,a.jsx)("span",{className:"text-gray-500",children:"Capacity"}),(0,a.jsxs)("span",{className:"text-gray-800",children:[n," / ",l]})]}),(0,a.jsx)("div",{className:"w-full h-2 bg-gray-100 rounded-full overflow-hidden",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-500 ".concat(i),style:{width:"".concat(Math.min(o,100),"%")}})})]})]}),(0,a.jsxs)("div",{className:"mt-5 pt-4 border-t border-gray-50 flex gap-2",children:[(0,a.jsx)("button",{className:"flex-1 py-2 text-xs font-bold text-gray-600 bg-gray-50 rounded-lg hover:bg-gray-100 transition-colors",children:"Edit"}),(0,a.jsx)("button",{className:"flex-1 py-2 text-xs font-bold text-white bg-dark-gray rounded-lg hover:bg-black transition-colors",children:"View Class"})]})]})}},90938:function(e,t,r){"use strict";var a=r(57437),s=r(66648),n=r(16463);t.default=()=>{let e=(0,n.useRouter)();return(0,a.jsxs)("form",{onSubmit:t=>{t.preventDefault();let r=t.currentTarget[0].value,a=new URLSearchParams(window.location.search);a.set("search",r),e.push("".concat(window.location.pathname,"?").concat(a))},className:"w-full md:w-auto flex items-center gap-2 text-xs rounded-full ring-[1.5px] ring-gray-300 px-2",children:[(0,a.jsx)(s.default,{src:"/search.png",alt:"",width:14,height:14}),(0,a.jsx)("input",{type:"text",placeholder:"Search...",className:"w-[200px] p-2 bg-transparent outline-none"})]})}}},function(e){e.O(0,[8173,2971,7023,1744],function(){return e(e.s=87907)}),_N_E=e.O()}]);