import React from 'react'; import { guideRegistry } from './guideRegistry'; import './VisualGuide.css'; /** * VisualGuide — displays a visual step-by-step guide card for a given task. * * @param {string} taskId - Key into guideRegistry (e.g. "copy_paste") * @param {string} osType - "Windows" or "Mac" (defaults to "Windows") */ function VisualGuide({ taskId, osType = 'Windows' }) { const guide = guideRegistry[taskId]; if (!guide) { return (

No visual guide available for this topic.

); } const steps = guide.variants[osType] ?? guide.variants['Windows'] ?? []; return (
{/* Header */}

{guide.title}

{osType}
{/* Steps list */}
    {steps.map((step) => (
  1. {/* Circle number */} {step.num} {/* Step content */}

    {step.text}

    {/* Keyboard key badges */} {step.keys && step.keys.length > 0 && (
    {step.keys.map((key, index) => ( {index > 0 && ( )} {key} ))}
    )}
  2. ))}
); } export default VisualGuide;