1import{K as f,bo as j,bp as v,k as N,r as g,j as t,bq as _,d as k}from"./index-Ct8eLu1I.js";import{u as C}from"./useOrganizationSlug-Im1jCHRI.js";import{u as R,P as L}from"./PublicPostCard-DpH8PYAh.js";import{u as O,d as P}from"./useRaceFeedComments-DP5lK-7N.js";import{M as c}from"./megaphone-EgNztnZk.js";import"./PostComments-W5orljD5.js";import"./thumbs-up-CrpZt3t6.js";import"./thumbs-down-ChN-DmeG.js";import"./textarea-ZX0L5GAv.js";import"./avatar-B8AgHX-V.js";import"./index-CJLyLLo7.js";import"./send-BmfKE8XA.js";import"./pen-cK6y1lt9.js";import"./trash-2-LxvlgA12.js";import"./eye-BX6Kc3UM.js";import"./eye-off-D8k5J7Ic.js";import"./formatDistanceToNow-nzxXZqmT.js";import"./en-US-CGO0aXMi.js";import"./differenceInCalendarMonths-D2gXU8RP.js";import"./endOfMonth--R-WtYph.js";import"./differenceInMilliseconds-CVPzdaho.js";import"./pin-HivEzZZx.js";import"./facebook-DyrCiiOy.js";import"./copy-BLDCcnKG.js";import"./share-2-B_pwvqGV.js";import"./chevron-left-m_yK3qef.js";import"./sanitized-html-D_hDi9wu.js";import"./purify.es-C5KSVp3G.js";const os=()=>{const{orgSlug:a}=f(),{data:s,isLoading:l}=C(a),{setOrganizationFromSlug:i,branding:e}=j(),{data:m=[],isLoading:p}=R(s==null?void 0:s.id),{data:d={}}=O(s==null?void 0:s.id),{data:u={}}=P(s==null?void 0:s.id),{data:n=[]}=v(),x=N();g.useEffect(()=>{a&&i(a)},[a,i]);const y=n.some(o=>o.id===(s==null?void 0:s.id)&&(o.role==="admin"||o.role==="super_admin")),h=a?`/org/${a}/login`:"/auth";return t.jsx(_,{children:t.jsxs("div",{className:"container mx-auto px-4 py-8 max-w-2xl",children:[t.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[t.jsx(c,{className:"h-6 w-6",style:{color:(e==null?void 0:e.primary_color)||"hsl(var(--primary))"}}),t.jsx("h1",{className:"text-2xl md:text-3xl font-display font-bold",children:x.feedLabel})]}),l||p?t.jsx("div",{className:"flex justify-center py-12",children:t.jsx(k,{className:"h-6 w-6 animate-spin",style:{color:(e==null?void 0:e.primary_color)||"hsl(var(--primary))"}})}):m.length===0?t.jsxs("div",{className:"text-center py-12 opacity-70",children:[t.jsx(c,{className:"h-12 w-12 mx-auto mb-3 opacity-40"}),t.jsx("p",{children:"No posts yet. Check back soon for live race updates."})]}):t.jsx("div",{className:"space-y-4",children:m.map(o=>{const r=d[o.id];return t.jsx("div",{id:o.id,children:t.jsx(L,{post:{...o,orgSlug:a},orgName:s==null?void 0:s.name,logoUrl:(e==null?void 0:e.logo_url)||void 0,primaryColor:(e==null?void 0:e.primary_color)||void 0,likeCount:(r==null?void 0:r.like_count)??0,dislikeCount:(r==null?void 0:r.dislike_count)??0,commentCount:(r==null?void 0:r.comment_count)??0,myReaction:u[o.id]??null,loginUrl:h,canModerate:y})},o.id)})})]})})};export{os 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.