/* Admin → Messaging: broadcasts + parent threads */
function MessagingScreen() {
const [tab, setTab] = React.useState('broadcasts');
const broadcasts = [
{ t:'Early dismissal this Friday at 1:00 PM', aud:'All Parents · Katy Middle', time:'2h ago', reach:'1,248 sent', icon:'megaphone', tint:'var(--blue-100)', ic:'var(--blue-500)' },
{ t:'Bus #7 running late on Route 3', aud:'Route 3 Families', time:'3h ago', reach:'19 sent', icon:'bus', tint:'var(--danger-100)', ic:'var(--danger-500)' },
{ t:'Spring book fair next week', aud:'All Parents', time:'1d ago', reach:'1,248 sent', icon:'book-open', tint:'var(--gold-100)', ic:'var(--gold-600)' },
];
const threads = [
{ n:'Jermaine Hatten', re:'Re: EJ pickup change', prev:'Thank you, that works for us.', time:'12m', c:'navy', unread:true },
{ n:'Ashley Brooks', re:'Bus stop question', prev:'Is the morning stop still at 7:40?', time:'1h', c:'blue', unread:true },
{ n:'Marcus Lee', re:'Lunch balance', prev:'Just added funds — thanks!', time:'4h', c:'green', unread:false },
];
return (
{/* composer */}
{/* parent threads */}
2 new}>
{threads.map((t,i)=>(
jlToast('Opening thread with '+t.n, { icon:'message-circle' })} style={{ display:'flex', alignItems:'flex-start', gap:11, padding:'11px 0', borderBottom: i
w[0]).join('')} color={t.c} size={34} />
{t.time}
{t.unread && }
))}
{/* sent broadcasts */}
jlToast('Showing all broadcasts', { icon:'megaphone' })} style={{ fontSize:12.5, fontWeight:700, color:'var(--blue-500)', cursor:'pointer' }}>View All}>
{broadcasts.map((b,i)=>(
))}
);
}
const selStyle = { flex:1, border:'1px solid var(--gray-200)', borderRadius:10, padding:'10px 12px', fontSize:13.5, fontFamily:'var(--font-sans)', color:'var(--ink)', background:'#fff', outline:'none' };
Object.assign(window, { MessagingScreen });