// vita-notify2.jsx — Lock screen ritual, "Hoy con Vita" center, notification settings // ── Lock screen: the morning ritual ───────────────────────────── function LockScreen({ t, persona, profile, notifs, onUnlock, onAction }) { const n = (profile.nombre || '').split(' ')[0]; const now = new Date(); const hh = now.getHours(); const greeting = hh < 12 ? 'Buenos días' : hh < 19 ? 'Buenas tardes' : 'Buenas noches'; // show the morning cluster (first 3-4) const shown = notifs.slice(0, 4); return (
{/* clock */}
{Icon.lock({ s: 13, c: t.dark ? 'rgba(255,255,255,0.7)' : 'rgba(10,26,51,0.6)' })} {now.toLocaleDateString('es-CO', { weekday: 'long', day: 'numeric', month: 'long' })}
{String(hh % 12 || 12).padStart(2, '0')}:{String(now.getMinutes()).padStart(2, '0')}
{/* Vita presence greeting */}
{greeting}, {n}
{/* notification stack */}
VITA TE ACOMPAÑA HOY
{shown.map((notif, i) => ( ))}
{/* unlock hint */}
); } // ── "Hoy con Vita" — notification center ──────────────────────── function NotificationCenter({ t, persona, profile, notifs, onAction, onBack, onSettings, onSimulate, onLockPreview }) { const accent = persona.accent; const byBloque = { 'mañana': [], 'tarde': [], 'noche': [] }; notifs.forEach(nf => { (byBloque[nf.bloque] || byBloque['mañana']).push(nf); }); const bloqueMeta = { 'mañana': { label: 'Mañana', icon: 'sunrise' }, 'tarde': { label: 'Tarde', icon: 'sundial' }, 'noche': { label: 'Noche', icon: 'moon' } }; return ( {Icon.consent({ s: 18, c: t.textSoft })}} />
{/* demo controls */}
{/* timeline by block */} {Object.keys(byBloque).map(bk => { const items = byBloque[bk]; if (!items.length) return null; const bm = bloqueMeta[bk]; return (
{Icon[bm.icon]({ s: 15, c: accent })} {bm.label}
{items.map((nf, i) => (
{i !== items.length - 1 &&
}
{Icon[nf.icon]({ s: 17, c: nf.color || accent })}
{nf.hora} {nf.done && {Icon.check({ s: 12, c: t.green, w: 3 })} Hecho}
{nf.mensaje}
{!nf.done && nf.actions && nf.actions.includes('done') && ( )}
))}
); })}
); } // ── Notification settings ─────────────────────────────────────── function NotifSettingsSheet({ t, persona, settings, onChange, onClose }) { const accent = persona.accent; const tipos = [ { k: 'medicamento', label: 'Recordatorios de medicamentos', icon: 'pill' }, { k: 'citas', label: 'Citas y controles', icon: 'calendar' }, { k: 'habitos', label: 'Hábitos (agua, caminar)', icon: 'droplet' }, { k: 'proactivo', label: 'Mensajes de Vita', icon: 'sparkle' }, { k: 'resultados', label: 'Resultados listos', icon: 'lab' }, ]; return (
Cómo te acompaño

Tú decides cómo y cuándo estoy presente. Siempre con respeto a tu espacio.

Qué te recuerdo
{tipos.map((ti, i) => (
{Icon[ti.icon]({ s: 18, c: accent })} {ti.label} onChange(ti.k, settings[ti.k] === false)} />
))}
{/* quiet hours */}
No molestar
{Icon.moon({ s: 18, c: '#A98CD9' })}
Silencio nocturno
No te escribo de 10 p.m. a 6 a.m.
onChange('quiet', settings.quiet === false)} />
); } function Toggle({ t, accent, on, onClick }) { return ( ); } Object.assign(window, { LockScreen, NotificationCenter, NotifSettingsSheet, Toggle });