module.exports=[16146,a=>{"use strict";var b=a.i(87924),c=a.i(72131);a.s(["default",0,function(){let[a,d]=(0,c.useState)(null),[e,f]=(0,c.useState)(!0);(0,c.useEffect)(()=>{let a=!1;return fetch("/api/auth",{cache:"no-store"}).then(a=>a.json()).then(b=>{if(!a){if(!b.user)return void window.location.replace("/login");d(b.user),f(!1)}}).catch(()=>!a&&window.location.replace("/login")),()=>{a=!0}},[]);let g=async()=>{await fetch("/api/auth",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({action:"logout"})}),window.location.replace("/login")};return e?(0,b.jsx)("div",{className:"login-shell",children:(0,b.jsx)("div",{className:"login-card",children:(0,b.jsx)("p",{className:"login-checking",children:"Loading your portal..."})})}):(0,b.jsxs)("div",{className:"portal-shell",children:[(0,b.jsxs)("header",{className:"portal-bar",children:[(0,b.jsxs)("div",{className:"login-brand",children:[(0,b.jsx)("span",{className:"brand-mark",children:"HO"}),(0,b.jsxs)("div",{children:[(0,b.jsx)("strong",{children:"Student Portal"}),(0,b.jsx)("small",{children:"Hostel Operations"})]})]}),(0,b.jsx)("button",{className:"secondary compact",onClick:g,children:"Sign out"})]}),(0,b.jsx)("main",{className:"portal-body",children:(0,b.jsxs)("section",{className:"portal-card",children:[(0,b.jsx)("span",{className:"section-kicker",children:"SIGNED IN"}),(0,b.jsxs)("h1",{children:["Hello, ",a?.displayName]}),(0,b.jsxs)("p",{children:["You are signed in as a resident (",a?.email,"). The student portal is still being built — your room details, bills and maintenance requests will appear here soon."]}),(0,b.jsxs)("div",{className:"portal-note",children:[(0,b.jsx)("strong",{children:"Coming soon"}),(0,b.jsxs)("ul",{children:[(0,b.jsx)("li",{children:"Your room and tenancy details"}),(0,b.jsx)("li",{children:"Monthly bills and payment history"}),(0,b.jsx)("li",{children:"Submit and track maintenance tickets"}),(0,b.jsx)("li",{children:"Hostel announcements"})]})]})]})})]})}])}];

//# sourceMappingURL=app_student_page_tsx_0pzpv_-._.js.map