/** * Map a category token's icon hint (a lucide-react icon name) to the actual * lucide component. Kept separate from theme/categories.ts so that module * stays pure-TS (no React/lucide import) while the editor can still resolve a * real icon component. Unknown names fall back to `Box`. */ import { Box, GitBranch, Play, Settings2, Shuffle, Workflow, Zap, type LucideIcon, } from 'lucide-react'; const ICONS: Record = { Box, GitBranch, Play, Settings2, Shuffle, Workflow, Zap, }; export function getCategoryIcon(iconName: string | undefined): LucideIcon { if (!iconName) return Box; return ICONS[iconName] ?? Box; }