import React from 'react' import { supportsCoarsePointer } from './constants' interface ConstellationLegendProps { isTouch: boolean domainCounts?: Record } export const ConstellationLegend: React.FC = ({ isTouch, domainCounts }) => { const items = [ { label: 'Technical', domain: 'technical', color: 'var(--accent)' }, { label: 'Clinical', domain: 'clinical', color: 'var(--success)' }, { label: 'Leadership', domain: 'leadership', color: 'var(--amber)' }, ] return (
{isTouch || supportsCoarsePointer ? 'Tap to explore connections' : 'Hover to explore connections'}
{items.map((item, i) => ( {i > 0 && ( )} {item.label}{domainCounts?.[item.domain] != null ? ` (${domainCounts[item.domain]})` : ''} ))}
) }