/* passenger/app.jsx — root */ function ToastSystem() { const [toasts, setToasts] = React.useState([]); React.useEffect(() => { window.showToast = (msg, kind = "info", undo = null) => { const id = Date.now(); setToasts(prev => [...prev.slice(-4), { id, msg, kind, undo }]); setTimeout(() => setToasts(prev => prev.filter(t => t.id !== id)), undo ? 10000 : 4000); }; }, []); const dismiss = id => setToasts(prev => prev.filter(t => t.id !== id)); return (