var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import { Balloon, Checkbox, Form, FormItem, Icon, Input, Radio, Select } from '@alicloud/console-components';
import React, { useState } from 'react';
var formItemLayout = {
    labelCol: {
        span: 8,
    },
    wrapperCol: {
        span: 16,
    },
};
export var dataSource = [
    {
        value: '10001',
        label: '选项A',
    },
    {
        value: '10002',
        label: '选项B',
    },
];
export default (function () {
    var _a = useState(false), visible = _a[0], setVisible = _a[1];
    var handleSubmit = function (values) {
        // @ts-ignore
        console.log('Get form value:', values);
    };
    var renderLable = function (text) { return (React.createElement("span", null,
        text,
        React.createElement(Balloon, { type: "primary", trigger: React.createElement(Icon, { style: {
                    marginLeft: 4,
                    display: 'inline-flex',
                }, type: "help", size: "xs" }), closable: false }, "blablablablablablablabla"))); };
    return (React.createElement(Form, __assign({ style: {
            width: '100%',
        } }, formItemLayout),
        React.createElement(FormItem, { label: renderLable('输入框') },
            React.createElement(Input, { name: "id", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" })),
        React.createElement(FormItem, { label: "\u9009\u62E9\u6846", required: true, requiredMessage: "\u8BF7\u9009\u62E9\u5FC5\u9009\u9879" },
            React.createElement(Select, { required: true, name: "province", placeholder: "\u8BF7\u9009\u62E9", size: "medium", dataSource: dataSource, style: {
                    width: 'calc(50% - 4px)',
                } }),
            React.createElement(Select, { required: true, name: "city", placeholder: "\u8BF7\u9009\u62E9", size: "medium", dataSource: dataSource, style: {
                    width: 'calc(50% - 4px)',
                    marginLeft: 8,
                } })),
        React.createElement(FormItem, { label: "\u5355\u9009\u9009\u9879" },
            React.createElement(Radio.Group, { name: "radio", direction: "ver" },
                React.createElement(Radio, { value: "apple" }, "\u9009\u98791"),
                React.createElement(Radio, { value: "banana" }, "\u9009\u98792"),
                React.createElement(Radio, { disabled: true, value: "cherry" }, "\u9009\u98793"))),
        React.createElement(FormItem, { label: "\u591A\u9009\u9009\u9879" },
            React.createElement(Checkbox.Group, { name: "checkboxs", direction: "ver" },
                React.createElement(Checkbox, { value: "a" },
                    "\u9009\u98791",
                    React.createElement("p", { style: {
                            margin: '0 0 4px 24px',
                            color: '#808080',
                            fontSize: '12px',
                            height: 0,
                        } }, "\u5BF9\u4E8E\u9009\u9879\u7684\u63CF\u8FF0/\u89E3\u91CA\u6587\u6848\uFF0C#808080\uFF0C12px")),
                React.createElement(Checkbox, { value: "b" },
                    "\u9009\u98792",
                    React.createElement("p", { style: {
                            margin: '0 0 4px 24px',
                            color: '#808080',
                            fontSize: '12px',
                            height: 0,
                        } }, "\u5BF9\u4E8E\u9009\u9879\u7684\u63CF\u8FF0/\u89E3\u91CA\u6587\u6848\uFF0C#808080\uFF0C12px")))),
        React.createElement("div", { style: {
                display: 'flex',
                justifyContent: 'flex-end',
                marginTop: 16,
            } },
            React.createElement(Form.Submit, { onClick: handleSubmit, validate: true, type: "primary" }, "\u63D0\u4EA4"),
            React.createElement(Form.Reset, { style: {
                    marginLeft: 8,
                }, onClick: function () { return setVisible(!visible); } }, "\u53D6\u6D88"))));
});
