import { useState, useEffect } from 'react'; export function AttendantOpsPanel({ activeChatsCount }) { const [isPaused, setIsPaused] = useState(false); const [secondsOnline, setSecondsOnline] = useState(0); useEffect(() => { let interval; if (!isPaused) { interval = setInterval(() => { setSecondsOnline((s) => s + 1); }, 1000); } return () => clearInterval(interval); }, [isPaused]); const formatTime = (totalSeconds) => { const h = Math.floor(totalSeconds / 3600); const m = Math.floor((totalSeconds % 3600) / 60); const s = totalSeconds % 60; return [h, m, s] .map(v => v.toString().padStart(2, '0')) .filter((v, i) => v !== '00' || i > 0) .join(':'); }; return (