import "./WorkflowIcon.css"; export interface WorkflowIconProps { workflowId: string; icon?: string; className?: string; decorative?: boolean; } function isBuiltinWorkflowId(workflowId: string): boolean { return workflowId.startsWith("builtin:"); } function classNames(...parts: Array): string { return parts.filter(Boolean).join(" "); } /** * FNXC:WorkflowIcons 2026-06-30-12:12: * Rich workflow identity surfaces render built-ins with the Fusion brand mark and custom workflows with compact text icons only when metadata exists. * Return null for no-icon custom workflows so cards, badges, and switchers never leave empty icon shells. */ export function WorkflowIcon({ workflowId, icon, className, decorative = false }: WorkflowIconProps) { const isBuiltin = isBuiltinWorkflowId(workflowId); const label = isBuiltin ? "Fusion built-in workflow" : "Workflow icon"; const accessibilityProps = decorative ? { "aria-hidden": true as const } : { role: "img" as const, "aria-label": label, title: label }; if (isBuiltin) { return ( ); } const trimmedIcon = typeof icon === "string" ? icon.trim() : ""; if (!trimmedIcon) return null; return ( ); }