import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import cn from 'classnames' import type { HttpNodeType } from './types' import type { NodeProps, Var } from '@/app/components/workflow/types' import useAvailableVarList from '@/app/components/workflow/nodes/_base/hooks/use-available-var-list' import { VarType } from '@/app/components/workflow/types' import Input from '@/app/components/workflow/nodes/_base/components/input-support-select-var' const Node: FC> = ({ id, data, }) => { const { t } = useTranslation() const { method, url } = data const availableVarList = useAvailableVarList(id, { onlyLeafNodeVar: false, filterVar: (varPayload: Var) => { return [VarType.string, VarType.number].includes(varPayload.type) }, }) return (
{method}
{ }} readOnly nodesOutputVars={availableVarList} onFocusChange={() => { }} placeholder={t('workflow.nodes.http.apiPlaceholder')!} placeholderClassName='!leading-[21px]' />
) } export default React.memo(Node)