import React from 'react'; import { ActionIcon } from '@mantine/core'; import { useTranslation } from 'react-i18next'; import { Tooltip } from './Tooltip'; import AppsIcon from '@mui/icons-material/AppsRounded'; import { useToolWorkflow } from '../../contexts/ToolWorkflowContext'; interface AllToolsNavButtonProps { activeButton: string; setActiveButton: (id: string) => void; } const AllToolsNavButton: React.FC = ({ activeButton, setActiveButton }) => { const { t } = useTranslation(); const { handleReaderToggle, handleBackToTools, selectedToolKey, leftPanelView } = useToolWorkflow(); const handleClick = () => { setActiveButton('tools'); // Preserve existing behavior used in QuickAccessBar header handleReaderToggle(); handleBackToTools(); }; // Do not highlight All Tools when a specific tool is open (indicator is shown) const isActive = activeButton === 'tools' && !selectedToolKey && leftPanelView === 'toolPicker'; const iconNode = ( ); return (
{iconNode} {t("quickAccess.allTools", "All Tools")}
); }; export default AllToolsNavButton;