/** * WireInProgressRenderer Component * * Renders a temporary wire preview while the user is creating a wire. * Shows a live path from the start endpoint to the current mouse position. * (Phase 2 - will be fully implemented when wire creation is added) */ import React, { useMemo } from 'react'; import type { WireInProgress } from '../../types/wire'; interface WireInProgressRendererProps { wireInProgress: WireInProgress; } export const WireInProgressRenderer: React.FC = ({ wireInProgress, }) => { // Generate simple path from start to current mouse position const path = useMemo(() => { const { startEndpoint, currentX, currentY } = wireInProgress; // Simple L-shape preview const midX = startEndpoint.x + (currentX - startEndpoint.x) / 2; return `M ${startEndpoint.x} ${startEndpoint.y} L ${midX} ${startEndpoint.y} L ${midX} ${currentY} L ${currentX} ${currentY}`; }, [wireInProgress]); return ( {/* Preview path (dashed green) */} {/* Start point marker */} {/* Current mouse position marker */} ); };