/** * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates * SPDX-License-Identifier: MIT */ import React from 'react'; import { IconButton } from '@douyinfe/semi-ui'; import { IconMinus } from '@douyinfe/semi-icons'; import { IFlowConstantRefValue } from '@/shared'; import { InjectVariableSelector } from '@/components/variable-selector'; import { InjectDynamicValueInput } from '@/components/dynamic-value-input'; import { BlurInput } from '@/components/blur-input'; import { AssignRowProps } from './types'; export function AssignRow(props: AssignRowProps) { const { value = { operator: 'assign', }, onChange, onDelete, readonly, } = props; return (
{value?.operator === 'assign' ? ( onChange?.({ ...value, left: { type: 'ref', content: v }, }) } /> ) : ( onChange?.({ ...value, left: v, }) } /> )}
onChange?.({ ...value, right: v, }) } />
{onDelete && (
} onClick={() => onDelete?.()} />
)}
); } export { type AssignValueType } from './types';