import React from 'react';
import { Input, Row, Col, Form } from '@btri-ui/base';
import { Checkbox } from '@btri-ui/base';
import { Button } from '@btri-ui/base';
import { Radio } from '@btri-ui/base';
import { Switch } from '@btri-ui/base';
import { Select } from '@btri-ui/base';

export default () => {
  const onFinish = (values: any) => {
    console.log('Success:', values);
  };

  const onFinishFailed = (errorInfo: any) => {
    console.log('Failed:', errorInfo);
  };
  const [form] = Form.useForm();
  const onReset = () => {
    form.resetFields();
  };
  return (
    <div>
      <Row autoMode={true}>
        <Col span={8}>
          <Form
            form={form}
            labelCol={{ span: 4 }}
            wrapperCol={{ span: 20 }}
            name="basic"
            initialValues={{ remember: true }}
            onFinish={onFinish}
            onFinishFailed={onFinishFailed}
            autoComplete="off"
          >
            <Form.Item
              name="text"
              label="输入框"
              rules={[{ required: true, message: '请输入文本!' }]}
            >
              <Input
                placeholder="请输入文本"
                vertify={{
                  status: 'error',
                  message: '校验存在严重问题文本提示',
                }}
              />
            </Form.Item>
            <Form.Item
              name="text"
              label="输入框"
              rules={[{ required: true, message: '请输入文本!' }]}
            >
              <Input
                placeholder="请输入文本"
                vertify={{
                  status: 'warning',
                  message: '校验不通过文本提示',
                }}
              />
            </Form.Item>
            <Form.Item
              name="text"
              label="输入框"
              rules={[{ required: true, message: '请输入文本!' }]}
            >
              <Input
                placeholder="请输入文本"
                vertify={{
                  status: 'success',
                  message: '校验通过文本提示',
                }}
              />
            </Form.Item>
            <Form.Item
              name="text"
              label="输入框"
              rules={[{ required: true, message: '请输入文本!' }]}
            >
              <Input.Search placeholder="请输入文本" loading />
            </Form.Item>
          </Form>
        </Col>
      </Row>
    </div>
  );
};
