import React from 'react';
import { NodeEditorProps } from './index';
import { Form, Input, Select } from '@arco-design/web-react';

const BasicNodeEditor: React.FC<NodeEditorProps> = ({
  node,
  nodeData,
  updateNodeData
}) => {
  return (
    <Form layout="vertical">
      <Form.Item label="节点标题">
        <Input
          value={nodeData.title || ''}
          onChange={(value) => updateNodeData('title', value)}
        />
      </Form.Item>
      <Form.Item label="描述">
        <Input.TextArea
          value={nodeData.description || ''}
          onChange={(value) => updateNodeData('description', value)}
        />
      </Form.Item>
      <Form.Item label="节点类型">
        <Select
          value={nodeData.category || ''}
          onChange={(value) => updateNodeData('category', value)}
          options={[
            { label: '数据处理', value: 'data' },
            { label: '逻辑判断', value: 'logic' },
            { label: '外部接口', value: 'api' }
          ]}
        />
      </Form.Item>
    </Form>
  );
};

export default BasicNodeEditor;