// LuzAlerts — Shared device shell & base components
const C = {
bg: '#0F172A', surface: '#1E293B', surfaceVar: '#334155',
amber: '#FBBF24', amberDim: '#F59E0B',
text: '#F8FAFC', textMid: '#CBD5E1', textMuted: '#94A3B8',
border: '#334155',
red: '#EF4444', redL: '#F87171',
green: '#22C55E', greenL: '#4ADE80',
violet: '#A855F7', violetL: '#C084FC',
blue: '#0A84FF',
};
/* ── Device Shell ── */
const LuzStatusBar = ({ time = '21:43' }) => (
);
const LuzPill = () => (
);
const LuzDevice = ({ children, bgColor = C.bg, statusBg = 'transparent', time }) => (
);
/* ── Shared atoms ── */
const StatusChip = ({ status }) => {
const map = {
activo: { bg: 'rgba(239,68,68,0.15)', text: C.redL, label: 'ACTIVO' },
programado:{ bg:'rgba(251,191,36,0.15)', text: C.amber, label: 'PROGRAMADO' },
resuelto: { bg: 'rgba(34,197,94,0.15)', text: C.greenL, label: 'RESUELTO' },
reporte: { bg: 'rgba(168,85,247,0.15)', text: C.violetL, label: 'REPORTADO' },
};
const s = map[status] || map.activo;
return (
{s.label}
);
};
const BottomNav = ({ active = 'map' }) => {
const tabs = [
{ id: 'map', label: 'Mapa', Icon: IMap },
{ id: 'list', label: 'Lista', Icon: IList },
{ id: 'reports', label: 'Reportes', Icon: IUsers, badge: 3 },
{ id: 'settings',label: 'Ajustes', Icon: IGear },
];
return (
{tabs.map(t => {
const isActive = t.id === active;
return (
{isActive &&
}
{t.badge && !isActive && (
{t.badge}
)}
{t.label}
);
})}
);
};
const TopBar = ({ title, large = false, left = null, right = null }) => (
{left ||
}
{!large &&
{title}}
{large &&
}
{right}
{large &&
{title}
}
);
const Btn48 = ({ children, style = {}, ...p }) => (
{children}
);
Object.assign(window, { C, LuzDevice, LuzStatusBar, LuzPill, StatusChip, BottomNav, TopBar, Btn48 });