import Button from '../../button';
import Dialog from '..';
import Radio from '../../radio';
import React from 'react';
import ReactDOM from 'react-dom';
const sizeList = [
    {
        value: 'xs',
        label: 'xs',
    },
    {
        value: 'small',
        label: 'small',
    },
    {
        value: 'middle',
        label: 'middle',
    },
    {
        value: 'large',
        label: 'large',
    },
];
class Demo extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
            size: 'middle',
        };
        this.onOpen = () => {
            this.setState({
                visible: true,
            });
        };
        this.onClose = (reason) => {
            console.log(reason);
            this.setState({
                visible: false,
            });
        };
        this.handlesize = (size) => {
            this.setState({ size });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Radio.Group, { defaultValue: "medium", dataSource: sizeList, value: this.state.size, onChange: this.handlesize }),
            React.createElement(Button, { onClick: this.onOpen, type: "primary" }, "Open dialog"),
            React.createElement(Dialog, { title: "Welcome to Alibaba.com", visible: this.state.visible, size: this.state.size, onOk: this.onClose.bind(this, 'okClick'), onCancel: this.onClose.bind(this, 'cancelClick'), onClose: this.onClose }, "Start your business here by searching a popular product")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('dialog-demo-11'));
