import{e as d,r,j as e,f}from"./index-sga-FecS.js";import{u as m}from"./DefaultLayout-R679muSx.js";import{b as p}from"./index.esm-7CdJvro0.js";import{C as h,a as x}from"./CRow-BaMSc2yS.js";import"./university-logo-full-HPG0vyLU.js";import"./cil-user-Dlmw-Gem.js";function y(){const{t:a}=d(),{user:s,loading:l,error:c}=m(),[j,o]=r.useState(!0),[g,i]=r.useState(null),[n,u]=r.useState(null);return r.useEffect(()=>{(async()=>{try{o(!0),i(null);const t=await f.get("/api/users/student-profile/");u(t.data)}catch(t){console.error("Error loading user profile:",t),i(!0)}finally{o(!1)}})()},[]),l?e.jsx("div",{children:"Loading..."}):c?e.jsx("div",{children:"Error loading user."}):s.role!=="AcademicAffairs"?e.jsx("div",{children:"Unauthorized"}):(n?.progress_percent,n?.current_stage,e.jsx(p,{fluid:!0,className:"py-4",children:e.jsx(h,{className:"mb-4",children:e.jsxs(x,{xs:"12",children:[e.jsx("h2",{className:"mb-1",children:a("academic_dashboard")}),e.jsxs("p",{className:"text-medium-emphasis mb-0",children:[a("academic_dashboard_welcome")," ",e.jsx("strong",{children:s?.full_name||s?.username})]})]})})}))}export{y as default};
