import type { FC } from 'react' import type { HumanInputNodeType } from './types' import type { NodeProps } from '@/app/components/workflow/types' import { RiMailSendFill, RiRobot2Fill, } from '@remixicon/react' import * as React from 'react' import { useTranslation } from 'react-i18next' import { NodeSourceHandle } from '../_base/components/node-handle' import { DeliveryMethodType } from './types' const i18nPrefix = 'nodes.humanInput' const Node: FC> = (props) => { const { t } = useTranslation() const { data } = props const deliveryMethods = data.delivery_methods const userActions = data.user_actions return ( <> {deliveryMethods.length > 0 && (
{t(`${i18nPrefix}.deliveryMethod.title`, { ns: 'workflow' })}
{deliveryMethods.map(method => (
{method.type === DeliveryMethodType.WebApp && (
)} {method.type === DeliveryMethodType.Email && (
)} {method.type}
))}
)}
{userActions.length > 0 && ( <> {userActions.map(userAction => (
{userAction.id}
))} )}
Timeout
) } export default React.memo(Node)