function SmartClassroom({ onNavigate }) { const [live, setLive] = React.useState(true); const [recording, setRecording] = React.useState(true); const students = [ { n: 'Rahul Kumar', on: true }, { n: 'Pooja Devi', on: true }, { n: 'Amit Verma', on: true }, { n: 'Suresh Naik', on: false }, { n: 'Priya Behera', on: true }, { n: 'Manoj Sahu', on: true }, { n: 'Ritika Panda', on: true }, { n: 'Deepak Meher', on: false }, { n: 'Sunil Das', on: true }, { n: 'Anita Rout', on: true }, { n: 'Vikram Jena', on: true }, { n: 'Neha Sahoo', on: false }, ]; const present = students.filter(s => s.on).length; const poll = [ { opt: 'Star connection', pct: 24 }, { opt: 'Delta connection', pct: 58 }, { opt: 'Star-Delta starter', pct: 14 }, { opt: 'Auto-transformer', pct: 4 }, ]; return (
{/* Main stage */}
● {live ? 'LIVE' : 'IDLE'}
Electrical Machines — Star vs Delta
Fitter · Batch F-2024-A · Room CR-3 · Smart Panel
{/* Smart board preview */}
SMART BOARD · CASTING {recording && ● REC 24:18}
{/* Annotation tool overlay */}
{[{ I: window.IconEdit, l: 'Pen / annotate' }, { I: window.IconTarget, l: 'Pointer' }, { I: window.IconLayers, l: 'Layers' }, { I: window.IconZoom, l: 'Zoom' }].map((o, i) => ( ))}
{/* Freehand annotation marks (CSS — valid across sizes) */}
{/* Bottom control bar */}
{recording ? 'Recording lecture' : 'Recording paused'}
{[{ I: window.IconMic, l: 'Microphone' }, { I: window.IconLayers, l: 'Layers' }, { I: window.IconGrid, l: 'Grid view' }].map((o, i) => ( ))}
{/* Live poll + tools */}
Live poll — instant feedback
{present} responses
Which connection reduces starting current?
{poll.map((p, i) => (
{i === 0 && '✓ '}{p.opt} {p.pct}%
))}
Session tools
{[ { l: 'Share screen', ic: window.IconGrid, cb: () => window.toast('Sharing your screen to the class') }, { l: 'Send quiz', ic: window.IconClipboard, cb: () => onNavigate('assess') }, { l: 'Assign lesson', ic: window.IconCube, cb: () => onNavigate('lesson') }, { l: 'Remote access', ic: window.IconGlobe, cb: () => window.toast('Remote classroom link copied') }, ].map(t => { const I = t.ic; return ( ); })}
{/* Right — attendance / roster */}
); } window.SmartClassroom = SmartClassroom;