// Prodz — Threads: community discussions. List + detail. Each thread is bound // to a production (brief §1.7). No dedicated chat icon — Inbox lives in the top bar. function ThreadsList() { const { L } = useL(); const nav = useNav(); const { ThreadCard, Button, Tag, Badge } = window.ProdzDesignSystem_d0b87b; const [q, setQ] = useStateS(''); const [filter, setFilter] = useStateS('ALL'); const allTags = Array.from(new Set(THREADS.reduce((a, t) => a.concat(t.tags), []))); const shown = THREADS.filter((t) => (filter === 'ALL' || t.tags.includes(filter)) && (!q || tr(L, t.title).toLowerCase().includes(q.toLowerCase()) || tr(L, t.body).toLowerCase().includes(q.toLowerCase()))); return (

Threads

{L('Discussioni della community.', 'Community discussions.')}

{/* search + category filters */}
setQ(e.target.value)} placeholder={L('Cerca nei thread…', 'Search threads…')} style={{ flex: 1, background: 'none', border: 'none', outline: 'none', color: 'var(--text-body)', fontSize: 14 }} />
{['ALL'].concat(allTags).map((c) => ( setFilter(c)} label={c === 'ALL' ? L('Tutti', 'All') : c} /> ))}
{shown.map((t) => { const author = PEOPLE[t.author]; const prod = PRODUCTIONS.find((p) => p.id === t.prod); return (
nav.openThread(t.id)} style={{ cursor: 'pointer' }}>
{/* production binding */}
{L('da', 'from')} {prod.title}
); })} {shown.length === 0 &&

{L('Nessun thread trovato.', 'No threads found.')}

}
); } function ThreadDetail({ id }) { const { L } = useL(); const nav = useNav(); const { Avatar, Badge, Tag, Input } = window.ProdzDesignSystem_d0b87b; const t = THREADS.find((x) => x.id === id) || THREADS[0]; const author = PEOPLE[t.author]; const prod = PRODUCTIONS.find((p) => p.id === t.prod); const replies = THREAD_REPLIES[t.id] || []; const Engage = ({ icon, n, color }) => {n} ; return (
{/* OP post */}
{author.name} OP
{tr(L, author.role)} · {tr(L, t.time)}
{prod.title}

{tr(L, t.title)}

{tr(L, t.body)}

{t.tags.map((tg) => {tg})}
{/* replies */}
{L('Risposte', 'Replies')} · {t.replies}
{replies.map((r, i) => { const ra = PEOPLE[r.author]; return (
{ra.name} {tr(L, ra.role)} · {tr(L, r.time)}

{tr(L, r.text)}

{(i + 1) * 4} {L('Rispondi', 'Reply')}
); })}
{/* composer */}
); } Object.assign(window, { ThreadsList, ThreadDetail });