1import{a as g,r,s as h,j as e,L as l,T as j}from"./index-eDwZB9f8.js";import{C as N}from"./ChapterAwardsTimeline-CpKt6yXA.js";import{A as x}from"./arrow-left-CMXrN3AQ.js";import"./gamificationHelpers-CuWe-yQg.js";import"./useBeliefLevelConfigs-DkT1N6ag.js";import"./gamification-Diktf44Z.js";import"./medal-PkPrW1z_.js";import"./crown-B5CDj38B.js";import"./lightbulb-Y_0Z_g2-.js";import"./zap-dnXecPSY.js";import"./Confetti-Bhvl2x2f.js";import"./star-CEB6OTqC.js";function B(){const{user:s}=g(),[o,c]=r.useState(null),[m,n]=r.useState(null),[u,d]=r.useState(""),[b,p]=r.useState(!0);r.useEffect(()=>{s&&f()},[s]);async function f(){if(!s)return;const{data:a}=await h.from("chapter_officers").select("chapter_id, chapters(id, name, type)").eq("user_id",s.id).maybeSingle();if(a!=null&&a.chapters){const t=a.chapters;c(t.id),n(t.type),d(t.name),p(!1);return}const{data:i}=await h.from("chapter_members").select("chapter_id, chapters(id, name, type)").eq("user_id",s.id).eq("status","active").maybeSingle();if(i!=null&&i.chapters){const t=i.chapters;c(t.id),n(t.type),d(t.name)}p(!1)}return b?e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-slate-900 via-blue-900 to-slate-900 py-8",children:e.jsx("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:e.jsxs("div",{className:"bg-slate-800/60 backdrop-blur-md border border-white/15 rounded-xl p-6 animate-pulse space-y-4",children:[e.jsx("div",{className:"h-5 bg-white/10 rounded w-1/3"}),[1,2,3].map(a=>e.jsx("div",{className:"h-28 bg-white/10 rounded-xl"},a))]})})}):!o||!m?e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-slate-900 via-blue-900 to-slate-900 py-8",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(l,{to:"/dashboard",className:"inline-flex items-center hover:bg-white/10 rounded-lg px-3 py-2 mb-6 transition-colors",children:[e.jsx(x,{className:"h-4 w-4 mr-2 text-gray-400"}),e.jsx("span",{className:"text-gray-300",children:"Back to Dashboard"})]}),e.jsxs("div",{className:"bg-slate-800/60 backdrop-blur-md border border-white/15 rounded-xl p-8 text-center",children:[e.jsx(j,{className:"w-16 h-16 text-gray-500 mx-auto mb-4"}),e.jsx("h2",{className:"text-xl font-bold text-white mb-2",children:"No Chapter Found"}),e.jsx("p",{className:"text-gray-400",children:"You need to be a member of a chapter to view chapter awards."}),e.jsx(l,{to:"/chapters",className:"inline-block mt-4 text-blue-400 hover:text-blue-300 font-medium",children:"Browse Chapters"})]})]})}):e.jsx("div",{className:"min-h-screen bg-gradient-to-b from-slate-900 via-blue-900 to-slate-900 py-8",children:e.jsxs("div",{className:"max-w-3xl mx-auto px-4 sm:px-6 lg:px-8",children:[e.jsxs(l,{to:"/dashboard",className:"inline-flex items-center hover:bg-white/10 rounded-lg px-3 py-2 mb-6 transition-colors",children:[e.jsx(x,{className:"h-4 w-4 mr-2 text-gray-400"}),e.jsx("span",{className:"text-gray-300",children:"Back to Dashboard"})]}),e.jsxs("div",{className:"mb-8",children:[e.jsx("h1",{className:"text-3xl font-bold text-white uppercase",style:{fontFamily:"Impact, sans-serif"},children:u}),e.jsx("p",{className:"text-gray-300 mt-2",children:"Chapter Awards Timeline"})]}),e.jsx(N,{chapterId:o,chapterType:m,mode:"full",theme:"dark"})]})})}export{B as ChapterAwards};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.