import { Button } from '@langgenius/dify-ui/button' import { Tooltip, TooltipContent, TooltipTrigger } from '@langgenius/dify-ui/tooltip' import { memo } from 'react' import { useTranslation } from 'react-i18next' import { useStore } from '@/app/components/workflow/store' const DifyBuilderButton = ({ disabled }: { disabled: boolean }) => { const { t } = useTranslation() const showDifyBuilderPanel = useStore((s) => s.showDifyBuilderPanel) const setShowDifyBuilderPanel = useStore((s) => s.setShowDifyBuilderPanel) const label = t(($) => $['difyBuilder.buttonTooltip'], { ns: 'workflow' }) // React Flow's nokey class preserves native Space activation on the button. return ( setShowDifyBuilderPanel(!showDifyBuilderPanel)} > {!showDifyBuilderPanel && {label}} } /> {label} ) } export default memo(DifyBuilderButton)