import React from "react"; import { Button } from "@mantine/core"; import { Tooltip } from "../../shared/Tooltip"; import { ToolRegistryEntry } from "../../../data/toolsTaxonomy"; import FitText from "../../shared/FitText"; interface ToolButtonProps { id: string; tool: ToolRegistryEntry; isSelected: boolean; onSelect: (id: string) => void; } const ToolButton: React.FC = ({ id, tool, isSelected, onSelect }) => { const isUnavailable = !tool.component && !tool.link; const handleClick = (id: string) => { if (isUnavailable) return; if (tool.link) { // Open external link in new tab window.open(tool.link, '_blank', 'noopener,noreferrer'); return; } // Normal tool selection onSelect(id); }; const tooltipContent = isUnavailable ? (Coming soon: {tool.description}) : tool.description; return ( ); }; export default ToolButton;