import GlassButton from "./GlassButton"; import GlassContainer from "./GlassContainer"; import { GLASS_EFFECTS } from "../constants"; interface WebcamCaptureProps { isRunning: boolean; onToggleRunning: () => void; error?: string | null; } export default function WebcamCapture({ isRunning, onToggleRunning, error }: WebcamCaptureProps) { const hasError = Boolean(error); const [statusText, statusColor, containerBgColor] = hasError ? ["Error", "bg-red-500", GLASS_EFFECTS.COLORS.ERROR_BG] : isRunning ? ["Live", "bg-green-500 animate-pulse", GLASS_EFFECTS.COLORS.DEFAULT_BG] : ["Paused", "bg-red-500", GLASS_EFFECTS.COLORS.DEFAULT_BG]; return ( <> {/* Control buttons - positioned absolutely over the video */}
{isRunning ? "Pause" : "Resume"}
{/* Status indicator with glass morphism */}
{statusText}
); }