import type { FC } from 'react' import { memo, } from 'react' import { useTranslation } from 'react-i18next' import { RiAddLine, } from '@remixicon/react' import useConfig from './use-config' import type { IfElseNodeType } from './types' import ConditionWrap from './components/condition-wrap' import Button from '@/app/components/base/button' import type { NodePanelProps } from '@/app/components/workflow/types' import Field from '@/app/components/workflow/nodes/_base/components/field' const i18nPrefix = 'workflow.nodes.ifElse' const Panel: FC> = ({ id, data, }) => { const { t } = useTranslation() const { readOnly, inputs, filterVar, handleAddCase, handleRemoveCase, handleSortCase, handleAddCondition, handleUpdateCondition, handleRemoveCondition, handleToggleConditionLogicalOperator, handleAddSubVariableCondition, handleRemoveSubVariableCondition, handleUpdateSubVariableCondition, handleToggleSubVariableConditionLogicalOperator, nodesOutputVars, availableNodes, varsIsVarFileAttribute, } = useConfig(id, data) const cases = inputs.cases || [] return (
{t(`${i18nPrefix}.elseDescription`)}
) } export default memo(Panel)