import { memo } from 'react' import { useTranslation } from 'react-i18next' import cn from 'classnames' import { useNodesReadOnly, useWorkflow, } from '../hooks' import { useStore } from '../store' import AddBlock from './add-block' import TipPopup from './tip-popup' import { Cursor02C, Hand02, } from '@/app/components/base/icons/src/vender/line/editor' import { Cursor02C as Cursor02CSolid, Hand02 as Hand02Solid, } from '@/app/components/base/icons/src/vender/solid/editor' import { OrganizeGrid } from '@/app/components/base/icons/src/vender/line/layout' const Control = () => { const { t } = useTranslation() const controlMode = useStore(s => s.controlMode) const setControlMode = useStore(s => s.setControlMode) const { handleLayout } = useWorkflow() const { nodesReadOnly, getNodesReadOnly, } = useNodesReadOnly() const goLayout = () => { if (getNodesReadOnly()) return handleLayout() } return (