import type { FC } from 'react' import { useTranslation } from 'react-i18next' import useConfig from './use-config' import type { TemplateTransformNodeType } from './types' import VarList from '@/app/components/workflow/nodes/_base/components/variable/var-list' import AddButton from '@/app/components/base/button/add-button' import Field from '@/app/components/workflow/nodes/_base/components/field' import Split from '@/app/components/workflow/nodes/_base/components/split' import CodeEditor from '@/app/components/workflow/nodes/_base/components/editor/code-editor' import OutputVars, { VarItem } from '@/app/components/workflow/nodes/_base/components/output-vars' import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general' import type { NodeProps } from '@/app/components/workflow/types' const i18nPrefix = 'workflow.nodes.templateTransform' const Panel: FC> = ({ id, data, }) => { const { t } = useTranslation() const readOnly = false const { inputs, handleVarListChange, handleAddVariable, handleCodeChange, } = useConfig(id, data) return (
} > {t(`${i18nPrefix}.code`)}
} headerRight={
{t(`${i18nPrefix}.codeSupportTip`)}
} value={inputs.template} onChange={handleCodeChange} />
<>
) } export default Panel