'use client' import type * as React from 'react' import { blockTypeToIconMap } from '@/components/ui/icon-mapping' interface BlockInfoCardProps { type: string color: string icon?: React.ComponentType<{ className?: string }> iconSvg?: string // Deprecated: Use automatic icon resolution instead } export function BlockInfoCard({ type, color, icon: IconComponent, iconSvg, }: BlockInfoCardProps): React.ReactNode { // Auto-resolve icon component from block type if not explicitly provided const ResolvedIcon = IconComponent || blockTypeToIconMap[type] || null return (
{ResolvedIcon ? ( ) : iconSvg ? (
) : (
{type.substring(0, 2)}
)}
) }