// LuzAlerts — Screens 5–7: Reportes, Modal Reportar, Ajustes /* ── SCREEN 5: Reportes vecinales ── */ const ReportCard = ({ name, bg, time, address, confirmed, total, expiring }) => { const pct = (confirmed / total) * 100; const chipColor = confirmed >= total ? C.greenL : expiring ? C.textMuted : C.amber; const chipBg = confirmed >= total ? 'rgba(74,222,128,0.15)' : expiring ? 'rgba(100,116,139,0.15)' : 'rgba(251,191,36,0.15)'; return (
{name[0]}
{name}
{time}
{expiring && Expira en 12 min}
{address}
{confirmed >= total ? '✓ Confirmado' : `${confirmed} / ${total} confirmaciones`}
= total ? C.greenL : C.amber, borderRadius: 2, transition: 'width 0.4s' }}/>
); }; const ScreenReports = () => ( }/> {/* Info banner */}
Cuando 3 vecinos reportan el mismo corte en menos de 500m, se confirma para todos.
{/* FAB */}
Reportar corte
); /* ── SCREEN 6: Modal reportar corte ── */ const ScreenReportModal = ({ state = 'default' }) => ( {/* Blurred map bg */}
{/* Bottom sheet */}
{state === 'confirmed' ? (
Reporte enviado ✓
Si más vecinos reportan, te avisamos cuando se confirme.
Listo
) : state === 'no-permission' ? (
Necesitamos tu ubicación
Para registrar el reporte necesitamos acceder a tu ubicación actual.
Activar ubicación
Cancelar
) : (
{state === 'loading' ? ( ) : }
¿No hay luz en tu zona?
Vamos a usar tu ubicación actual para registrar el reporte. Si 3 vecinos reportan lo mismo en menos de 500m, se confirma como un corte real.
{/* Location card */}
Tu ubicación
Av. Mariscal López, Asunción
±15 m
{state === 'loading' ? 'Detectando ubicación…' : 'Confirmar reporte'}
Cancelar
)}
); /* ── SCREEN 7: Ajustes ── */ const SettingSection = ({ title, children }) => (
{title}
{children}
); const SettingRow = ({ icon: Icon, iconColor = C.textMuted, label, sub, right, danger, divider = true }) => (
{Icon && }
{label}
{sub &&
{sub}
}
{right}
{divider &&
}
); const Toggle = ({ on = true }) => (
); const ScreenSettings = () => ( }/>
}/> }/>
1km3km5km10km20km
} /> Cambiar}/> 2
}/>
}/> }/> }/> }/> }/> }/>
LuzAlerts v1.0.0
Proyecto independiente. No afiliado a la ANDE.
); Object.assign(window, { ScreenReports, ScreenReportModal, ScreenSettings });