// ScreenMap.jsx — full-screen geographic map with line filter
function ScreenMap({ go, t }) {
const lineStatus = useLiveStatus();
const [selected, setSelected] = React.useState(['A','B','C','D','E','H','P']);
const [showEntrances, setShowEntrances] = React.useState(false);
const toggleLine = (id) => setSelected(s => s.includes(id) ? s.filter(x => x !== id) : [...s, id]);
const MAP_LINES = LINES.filter(l => l.id !== 'U');
const selectAll = () => setSelected(MAP_LINES.map(l => l.id));
return (
{/* map surface — fills all space above bottom sheet */}
{}}
/>
{/* back button — floating top-left */}
{/* Closed station notice */}
{CLOSED_TODAY.length > 0 && (
⚠ {CLOSED_TODAY.length} estacion{CLOSED_TODAY.length > 1 ? 'es' : ''} cerrada{CLOSED_TODAY.length > 1 ? 's' : ''} hoy
)}
{/* bottom sheet: line filter + train toggle */}
{/* Row: "Líneas" label + "Todas" link + bocas toggle */}
Líneas
{/* Bocas toggle */}
{/* Line pills */}
{MAP_LINES.map(l => {
const on = selected.includes(l.id);
const status = lineStatus[l.id];
const isLight = l.id === 'H' || l.id === 'P';
const textColor = on ? (isLight ? '#0B1220' : 'white') : 'var(--text-muted)';
return (
);
})}
);
}
Object.assign(window, { ScreenMap });