import React from 'react';
import { Form, Input, DatePicker, Select } from 'antd';
import { STATUS } from '@/constants/status';

export const ProjectForm = ({ form }) => (
  <Form form={form} layout="vertical">
    <Form.Item
      name="name"
      label="专案名称"
      rules={[{ required: true, message: '请输入专案名称' }]}
    >
      <Input />
    </Form.Item>
    
    <Form.Item
      name="manager"
      label="负责人"
      rules={[{ required: true, message: '请选择负责人' }]}
    >
      <Select placeholder="请选择负责人" />
    </Form.Item>
    
    <Form.Item
      name="startDate"
      label="开始日期"
      rules={[{ required: true, message: '请选择开始日期' }]}
    >
      <DatePicker />
    </Form.Item>
    
    <Form.Item
      name="status"
      label="状态"
      rules={[{ required: true, message: '请选择状态' }]}
    >
      <Select>
        {Object.values(STATUS).map(status => (
          <Select.Option key={status} value={status}>
            {status}
          </Select.Option>
        ))}
      </Select>
    </Form.Item>
  </Form>
);