"use strict";
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);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.dataSource = void 0;
var console_components_1 = require("@alicloud/console-components");
var react_1 = __importStar(require("react"));
var formItemLayout = {
    labelCol: {
        span: 8,
    },
    wrapperCol: {
        span: 16,
    },
};
exports.dataSource = [
    {
        value: '10001',
        label: '选项A',
    },
    {
        value: '10002',
        label: '选项B',
    },
];
exports.default = (function () {
    var _a = (0, react_1.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_1.default.createElement("span", null,
        text,
        react_1.default.createElement(console_components_1.Balloon, { type: "primary", trigger: react_1.default.createElement(console_components_1.Icon, { style: {
                    marginLeft: 4,
                    display: 'inline-flex',
                }, type: "help", size: "xs" }), closable: false }, "blablablablablablablabla"))); };
    return (react_1.default.createElement(console_components_1.Form, __assign({ style: {
            width: '100%',
        } }, formItemLayout),
        react_1.default.createElement(console_components_1.FormItem, { label: renderLable('输入框') },
            react_1.default.createElement(console_components_1.Input, { name: "id", placeholder: "\u8BF7\u8F93\u5165\u5185\u5BB9" })),
        react_1.default.createElement(console_components_1.FormItem, { label: "\u9009\u62E9\u6846", required: true, requiredMessage: "\u8BF7\u9009\u62E9\u5FC5\u9009\u9879" },
            react_1.default.createElement(console_components_1.Select, { required: true, name: "province", placeholder: "\u8BF7\u9009\u62E9", size: "medium", dataSource: exports.dataSource, style: {
                    width: 'calc(50% - 4px)',
                } }),
            react_1.default.createElement(console_components_1.Select, { required: true, name: "city", placeholder: "\u8BF7\u9009\u62E9", size: "medium", dataSource: exports.dataSource, style: {
                    width: 'calc(50% - 4px)',
                    marginLeft: 8,
                } })),
        react_1.default.createElement(console_components_1.FormItem, { label: "\u5355\u9009\u9009\u9879" },
            react_1.default.createElement(console_components_1.Radio.Group, { name: "radio", direction: "ver" },
                react_1.default.createElement(console_components_1.Radio, { value: "apple" }, "\u9009\u98791"),
                react_1.default.createElement(console_components_1.Radio, { value: "banana" }, "\u9009\u98792"),
                react_1.default.createElement(console_components_1.Radio, { disabled: true, value: "cherry" }, "\u9009\u98793"))),
        react_1.default.createElement(console_components_1.FormItem, { label: "\u591A\u9009\u9009\u9879" },
            react_1.default.createElement(console_components_1.Checkbox.Group, { name: "checkboxs", direction: "ver" },
                react_1.default.createElement(console_components_1.Checkbox, { value: "a" },
                    "\u9009\u98791",
                    react_1.default.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_1.default.createElement(console_components_1.Checkbox, { value: "b" },
                    "\u9009\u98792",
                    react_1.default.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_1.default.createElement("div", { style: {
                display: 'flex',
                justifyContent: 'flex-end',
                marginTop: 16,
            } },
            react_1.default.createElement(console_components_1.Form.Submit, { onClick: handleSubmit, validate: true, type: "primary" }, "\u63D0\u4EA4"),
            react_1.default.createElement(console_components_1.Form.Reset, { style: {
                    marginLeft: 8,
                }, onClick: function () { return setVisible(!visible); } }, "\u53D6\u6D88"))));
});
