import Checkbox from '../../checkbox';
import Form from '..';
import Input from '../../input';
import React from 'react';
import ReactDOM from 'react-dom';
const FormItem = Form.Item;
const formItemLayout = {
    labelCol: {
        fixedSpan: 8,
    },
    wrapperCol: {
        span: 14,
    },
};
class Demo extends React.Component {
    constructor(props) {
        super(props);
        this.handleSubmit = (values, errors) => {
            console.log('value & errors', values, errors);
        };
    }
    render() {
        return (React.createElement(Form, Object.assign({ style: { width: '60%' } }, formItemLayout, { colon: true }),
            React.createElement(FormItem, { label: "Username:", required: true, requiredMessage: "Please input your username!" },
                React.createElement(Input, { name: "baseUser" })),
            React.createElement(FormItem, { label: "Password:", required: true, requiredMessage: "Please input your password!" },
                React.createElement(Input.Password, { name: "basePass", placeholder: "Please Enter Password" })),
            React.createElement(FormItem, { label: " ", colon: false },
                React.createElement(Checkbox, { name: "agreement", defaultChecked: true }, "Agree")),
            React.createElement(FormItem, { label: " ", colon: false },
                React.createElement(Form.Submit, { type: "primary", validate: true, onClick: this.handleSubmit, style: { marginRight: 8 } }, "Submit"),
                React.createElement(Form.Reset, null, "Reset"))));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('form-demo-1'));
