(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,271974,e=>{"use strict";var s=e.i(843476),t=e.i(522016),a=e.i(271645);function i({data:e}){return(0,s.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(e)}})}var l=e.i(744022);e.s(["Breadcrumb",0,function({items:e,align:n="center",className:r="mb-6"}){let c=(0,l.getServerSideURL)(),o={"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:e.map(e=>({label:e.label,url:e.href?`${c}${e.href}`:void 0})).map((e,s)=>({"@type":"ListItem",position:s+1,name:e.label,...e.url?{item:e.url}:{}}))};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(i,{data:o}),(0,s.jsx)("nav",{className:`flex items-center gap-2 text-white/50 text-sm ${"center"===n?"justify-center":""} ${r}`,"aria-label":"Breadcrumb",children:e.map((i,l)=>(0,s.jsxs)(a.default.Fragment,{children:[i.href?(0,s.jsx)(t.default,{href:i.href,className:"hover:text-white",children:i.label}):(0,s.jsx)("span",{className:"text-white",children:i.label}),l{"use strict";var s=e.i(843476),t=e.i(271645),a=e.i(657688),i=e.i(271974);let l=[{icon:"📥",label:"Application Received",desc:"Your application has been received and is in our system."},{icon:"📤",label:"Forwarded to Admissions",desc:"Your application has been forwarded to the admissions team for review."},{icon:"📋",label:"Documents Verification",desc:"Our team is verifying your submitted documents."},{icon:"👤",label:"Application Review",desc:"Your application is being reviewed by the admissions committee."},{icon:"🏛️",label:"Decision Made",desc:"A decision has been made on your application."}],n={submitted:1,"under-review":3,"docs-requested":2,admitted:5,conditional:5,declined:5},r={submitted:{label:"Application Submitted",color:"#1B2A3A",icon:"📨",desc:"Your application has been received and is in the queue for review."},"under-review":{label:"Under Review",color:"#F59E0B",icon:"🔍",desc:"Your application is currently being assessed by our admissions team."},"docs-requested":{label:"Documents Requested",color:"#EF4444",icon:"📋",desc:"Additional documents have been requested. Please check your email."},admitted:{label:"Admitted — Congratulations! 🎉",color:"#2E7D32",icon:"✅",desc:"You have been offered a place at DOIM. Please check your email for your formal admission letter."},conditional:{label:"Conditional Offer",color:"#C1923B",icon:"⏳",desc:"You have been offered a conditional place. Please review the conditions in your email."},declined:{label:"Application Unsuccessful",color:"#6B7280",icon:"❌",desc:"Unfortunately your application was not successful this time. Please contact admissions for feedback."},withdrawn:{label:"Application Withdrawn",color:"#94A3B8",icon:"🚫",desc:"This application has been withdrawn."}};e.s(["default",0,function(){let[e,c]=(0,t.useState)(""),[o,d]=(0,t.useState)(""),[m,u]=(0,t.useState)(!1),[x,h]=(0,t.useState)(null),[b,p]=(0,t.useState)("");(0,t.useEffect)(()=>{let e=new URLSearchParams(window.location.search).get("ref");e&&c(e.toUpperCase())},[]);let f=async s=>{s.preventDefault(),u(!0),p(""),h(null);try{let s=await fetch(`/api/application-status?ref=${encodeURIComponent(e)}&email=${encodeURIComponent(o)}`),t=await s.json();s.ok&&t.found?h(t):p(t.message||"No application found with those details. Please check your reference number and email.")}catch{p("Network error. Please try again.")}finally{u(!1)}},j=x?.status?r[x.status]:null;return(0,s.jsxs)("div",{className:"overflow-x-hidden",children:[(0,s.jsxs)("section",{className:"relative py-24 overflow-hidden",children:[(0,s.jsxs)("div",{className:"absolute inset-0",children:[(0,s.jsx)(a.default,{src:"https://images.unsplash.com/photo-1744320911030-1ab998d994d7?w=1600&q=80&fit=crop",alt:"Application Status - DOIM Uganda",fill:!0,className:"object-cover",priority:!0}),(0,s.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-[#1B2A3A]/95 via-[#1B2A3A]/85 to-transparent"})]}),(0,s.jsxs)("div",{className:"container relative z-10 text-center",children:[(0,s.jsx)(i.Breadcrumb,{items:[{label:"Home",href:"/"},{label:"Admissions",href:"/admissions"},{label:"Application Status"}]}),(0,s.jsx)("span",{className:"value-badge",style:{background:"rgba(193, 146, 59,0.15)",borderColor:"rgba(193, 146, 59,0.3)",color:"#C1923B"},children:"Track Your Application"}),(0,s.jsx)("h1",{className:"text-4xl md:text-5xl font-black text-white mt-4 mb-5",style:{fontFamily:"Inter, sans-serif"},children:"Application Status"}),(0,s.jsx)("p",{className:"text-white/70 max-w-xl mx-auto",children:"Enter your reference number and email address to check the status of your DOIM application."})]})]}),(0,s.jsx)("section",{className:"py-16 bg-[#F8FAFC]",children:(0,s.jsxs)("div",{className:"container max-w-lg mx-auto",children:[(0,s.jsxs)("div",{className:"bg-white rounded-3xl border border-[#E5E7EB] shadow-sm p-8",children:[(0,s.jsx)("h2",{className:"text-xl font-bold text-[#1B2A3A] mb-6",style:{fontFamily:"Inter, sans-serif"},children:"Check Your Application"}),(0,s.jsxs)("form",{onSubmit:f,className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-[#374151] mb-1.5",children:"Application Reference Number *"}),(0,s.jsx)("input",{type:"text",required:!0,className:"w-full border border-[#E5E7EB] rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-[#1B2A3A]",placeholder:"e.g. DOIM-2026-00001",value:e,onChange:e=>c(e.target.value.toUpperCase())})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("label",{className:"block text-sm font-semibold text-[#374151] mb-1.5",children:"Email Address used on Application *"}),(0,s.jsx)("input",{type:"email",required:!0,className:"w-full border border-[#E5E7EB] rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-[#1B2A3A]",placeholder:"your@email.com",value:o,onChange:e=>d(e.target.value)})]}),b&&(0,s.jsxs)("div",{className:"bg-rose-50 border border-rose-200 rounded-xl p-4 text-rose-800 text-sm",children:["❌ ",b]}),(0,s.jsx)("button",{type:"submit",disabled:m,className:"w-full btn-primary py-4 justify-center disabled:opacity-60",children:m?"⏳ Checking...":"🔍 Check Status"})]}),x&&j&&(0,s.jsxs)("div",{className:"mt-6 border-t border-[#F8FAFC] pt-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,s.jsx)("div",{className:"text-4xl",children:j.icon}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-xs text-[#6B7280] font-medium",children:"Application Status"}),(0,s.jsx)("div",{className:"font-bold text-lg",style:{color:j.color},children:j.label})]})]}),(0,s.jsx)("div",{className:"bg-[#F8FAFC] rounded-xl p-4 text-sm text-[#374151] mb-4",children:j.desc}),"withdrawn"!==x.status&&(0,s.jsxs)("div",{className:"mb-6",children:[(0,s.jsx)("h3",{className:"text-sm font-bold text-[#1B2A3A] mb-4",children:"📋 Application Progress"}),(0,s.jsx)("div",{className:"space-y-0",children:l.map((e,t)=>{let a=t<(n[x.status]??0),i=t===l.length-1;return(0,s.jsxs)("div",{className:"flex gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col items-center",children:[(0,s.jsx)("div",{className:`w-9 h-9 rounded-full flex items-center justify-center text-sm flex-shrink-0 ${a?"bg-[#1B2A3A] text-white":"bg-[#EEF2F6] text-[#94A3B8]"}`,children:e.icon}),!i&&(0,s.jsx)("div",{className:`w-0.5 flex-1 min-h-[2rem] ${a?"bg-[#1B2A3A]":"bg-[#E5E7EB]"}`})]}),(0,s.jsxs)("div",{className:"pb-6",children:[(0,s.jsx)("div",{className:`font-semibold text-sm ${a?"text-[#1B2A3A]":"text-[#94A3B8]"}`,children:e.label}),(0,s.jsx)("div",{className:"text-xs text-[#6B7280] mt-0.5",children:e.desc})]})]},e.label)})})]}),(0,s.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-[#6B7280]",children:"Reference"}),(0,s.jsx)("span",{className:"font-bold",children:x.referenceNumber||e})]}),x.fullName&&(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-[#6B7280]",children:"Applicant"}),(0,s.jsx)("span",{className:"font-bold",children:x.fullName})]}),x.firstChoice&&(0,s.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-[#6B7280] flex-shrink-0",children:"First Choice"}),(0,s.jsx)("span",{className:"font-bold text-right",children:x.firstChoice})]}),x.secondChoice&&(0,s.jsxs)("div",{className:"flex justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-[#6B7280] flex-shrink-0",children:"Second Choice"}),(0,s.jsx)("span",{className:"font-bold text-right",children:x.secondChoice})]}),x.submittedAt&&(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-[#6B7280]",children:"Submitted"}),(0,s.jsx)("span",{className:"font-bold",children:new Date(x.submittedAt).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})})]}),x.admissionNumber&&(0,s.jsxs)("div",{className:"flex justify-between",children:[(0,s.jsx)("span",{className:"text-[#6B7280]",children:"Admission No."}),(0,s.jsx)("span",{className:"font-bold",children:x.admissionNumber})]})]}),"admitted"===x.status&&(0,s.jsxs)("div",{className:"mt-4 bg-emerald-50 border border-emerald-200 rounded-xl p-4",children:[(0,s.jsx)("div",{className:"font-bold text-emerald-800 mb-1",children:"🎉 Congratulations!"}),(0,s.jsx)("div",{className:"text-emerald-700 text-sm",children:"Check your email for your official admission letter with registration instructions."})]})]})]}),(0,s.jsxs)("div",{className:"mt-6 bg-amber-50 border border-amber-200 rounded-2xl p-5 text-sm",children:[(0,s.jsx)("div",{className:"font-bold text-amber-800 mb-2",children:"📌 Don't have a reference number?"}),(0,s.jsxs)("p",{className:"text-amber-700",children:["Your reference number was sent to you by email immediately after you submitted your application. It has the format ",(0,s.jsx)("strong",{children:"DOIM-2026-XXXXX"}),". If you can't find it, contact ",(0,s.jsx)("a",{href:"mailto:admissions@doim.ac.ug",className:"underline",children:"admissions@doim.ac.ug"}),"."]})]})]})})]})}])}]);