1import{bI as m,r as a,j as t,at as u}from"./index-BgbqYyaj.js";import{supabase as x}from"./client-B3XYGzq4.js";import"./tslib.es6-eMSY344_.js";function f(){const{id:r}=m.useParams(),[e,l]=a.useState(null),[c,n]=a.useState(!1);if(a.useEffect(()=>{x.from("articles").select("*, categories!articles_category_id_fkey(slug,name,accent_color), authors!articles_author_id_fkey(name,slug,avatar_url)").eq("id",r).maybeSingle().then(({data:i})=>{i?l(i):n(!0)})},[r]),c)return t.jsx("div",{className:"p-10 text-center text-muted-foreground",children:"Article not found."});if(!e)return t.jsx("div",{className:"p-10 text-center text-muted-foreground",children:"Loading previewâ¦"});const s=e.categories,o=e.authors,d=s?.accent_color||"#0033CC";return t.jsxs("div",{children:[t.jsxs("div",{className:"bg-cobalt text-cobalt-foreground text-center py-2 yh-eyebrow text-sm sticky top-0 z-50",children:["PREVIEW MODE · Status: ",e.status," · ",e.status!=="published"?"Not visible to public":"Live"]}),t.jsxs("article",{className:"max-w-3xl mx-auto px-4 py-10",children:[s&&t.jsx("p",{className:"yh-eyebrow text-xs mb-3",style:{color:d},children:s.name}),t.jsx("h1",{className:"yh-headline text-5xl leading-tight",children:e.title}),e.subtitle&&t.jsx("p",{className:"mt-3 text-xl text-muted-foreground",children:e.subt
1itle}),t.jsxs("div",{className:"mt-4 text-sm text-muted-foreground",children:[o?.name&&t.jsxs(t.Fragment,{children:["By ",o.name," · "]}),e.published_at?new Date(e.published_at).toLocaleDateString():"Unpublished"]}),e.hero_image_url&&t.jsxs("figure",{className:"mt-6",children:[t.jsx("img",{src:e.hero_image_url,alt:e.hero_image_alt??"",className:"w-full",loading:"eager"}),e.hero_image_credit&&t.jsx("figcaption",{className:"mt-2 text-xs text-muted-foreground yh-eyebrow",children:e.import_flags?.ai_generated?"Young Hollywood / AI":`Photo: ${e.hero_image_credit.replace(/^\s*photo\s*:\s*/i,"")}`})]}),e.excerpt&&t.jsx("p",{className:"mt-6 text-lg leading-relaxed font-medium",children:e.excerpt}),t.jsx("div",{className:"mt-6",children:t.jsx(u,{body:e.body})})]})]})}export{f as component};
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.