1import{ay as w,r as n,j as e,bb as j,bg as N}from"./vendor-BFIOfVip.js";import{b as v,ct as k,bB as E}from"./vendor-icons-BjlO8Ivt.js";import{F as c,I as x,H as h,m,L as D,G as S,J as A}from"./vendor-firebase-IWWIlHC2.js";import{d as p}from"./index-BWk9MH7v.js";import{m as s}from"./vendor-motion-C4-LgF0B.js";const B=()=>{const u=w(),[d,b]=n.useState([]),[r,g]=n.useState(null);n.useEffect(()=>{const t=c(m(p,"youth_feed"),h("createdAt","desc"),x(5)),o=D(t,i=>{b(i.docs.map(a=>({id:a.id,...a.data()})))});return(async()=>{const i=new Date().toISOString(),a=c(m(p,"youth_events"),S("date",">=",i),h("date","asc"),x(1)),l=await A(a);l.empty||g({id:l.docs[0].id,...l.docs[0].data()})})(),()=>o()},[]);const y=t=>{try{return j(new Date(t),"EEE, MMM do @ h:mm a")}catch{return t}},f=t=>{if(!t)return"";const o=t.toDate?t.toDate():new Date(t);return N(o,{addSuffix:!0})};return e.jsxs("div",{className:"space-y-8",children:[e.jsxs(s.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},className:"bg-gradient-to-r from-purple-600 to-indigo-600 rounded-3xl p-8 md:p-12 text-white relative overflow-hidden shadow-2xl shadow-purple-900/50",children:[e.jsxs("div",{className:"relative z-10 max-w-2xl",children:[e.jsx("h1",{className:"text-4xl md:text-5xl font-black italic mb-4",children:"WHAT'S GOOD? ð"}),e.jsx("p",{className:"text-lg text-purple-100 font-medium mb-8",children:"Welcome to the fam. Check out what's happening this week, connect with your squad, and stay fired up."}),e.jsx("button",{onClick:()=>u("/youth/events"),className:"bg-white text-purple-600 px-8 py-3 rounded-full font-bold hover:bg-yellow-400 hover:text-black transition-all transform hover:scale-105 shadow-lg",children:"View Schedule"})]}),e.jsx("div",{className:"absolute right-0 top-0 h-full w-1/3 bg-white/10 skew-x-12 transform origin-bottom-right"})]}),e.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[e.jsxs(s.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.1},className:"bg-gray-900 border border-gray-800 p-6 rounded-2xl hover:border-yellow-400/50 transition-colors group",children:[e.jsx("div",{className:"w-12 h-12 bg-yellow-400/20 text-yellow-400 rounded-xl flex items-center justify-center mb-4 group-hover:bg-yellow-400 group-hover:text-black transition-all",children:e.jsx(v,{className:"w-6 h-6"})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:"Next Event"}),r?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-gray-400 text-sm",children:r.title}),e.jsx("p",{className:"text-white font-bold mt-1",children:y(r.date)})]}):e.jsx("p",{className:"text-gray-500 text-sm",children:"No upcoming events."})]}),e.jsxs(s.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.2},className:"bg-gray-900 border border-gray-800 p-6 rounded-2xl hover:border-purple-400/50 transition-colors group",children:[e.jsx("div",{className:"w-12 h-12 bg-purple-400/20 text-purple-400 rounded-xl flex items-center justify-center mb-4 group-hover:bg-purple-400 group-hover:text-white transition-all",children:e.jsx(k,{className:"w-6 h-6"})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:"Squad Chat"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"3 new messages"}),e.jsx("p",{className:"text-white font-bold mt-1",children:"High School Boys"})]}),e.jsxs(s.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:.3},className:"bg-gray-900 border border-gray-800 p-6 rounded-2xl hover:border-pink-400/50 transition-colors group",children:[e.jsx("div",{className:"w-12 h-12 bg-pink-400/20 text-pink-400 rounded-xl flex items-center justify-center mb-4 group-hover:bg-pink-400 group-hover:text-white transition-all",children:e.jsx(E,{className:"w-6 h-6"})}),e.jsx("h3",{className:"text-xl font-bold text-white mb-2",children:"Latest Word"}),e.jsx("p",{className:"text-gray-400 text-sm",children:"Pastor Tim"}),e.jsx("p",{className:"text-white font-bold mt-1",children:'"Unstoppable Faith"'})]})]}),e.jsxs("div",{className:"bg-gray-900 border border-gray-800 rounded-2xl p-6 md:p-8",children:[e.jsx("h3",{className:"text-2xl font-black text-white italic mb-6 uppercase",children:"The Feed"}),e.jsxs("div",{className:"space-y-6",children:[d.length===0&&e.jsx("p",{className:"text-gray-500 text-center py-4",children:"No new updates. Stay tuned!"}),d.map(t=>e.jsxs("div",{className:"flex gap-4 border-b border-gray-800 pb-6 last:border-0 last:pb-0",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-purple-500 to-indigo-500 flex items-center justify-center text-white font-bold shrink-0",children:t.author.charAt(0)}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"font-bold text-white",children:t.author}),e.jsx("span",{className:"text-xs text-gray-500",children:f(t.createdAt)})]}),e.jsx("p",{className:"text-gray-300 leading-relaxed",children:t.content})]})]},t.id))]})]})]})};export{B as default};
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.