import Button from '../../button';
import Dialog from '..';
import React from 'react';
import ReactDOM from 'react-dom';
class Demo extends React.Component {
    constructor() {
        super(...arguments);
        this.state = {
            visible: false,
            fullyCustomizedVisible: false,
            textCustomizedVisible: false,
        };
        this.onOpenFullyCustomized = () => {
            this.setState({
                fullyCustomizedVisible: true,
            });
        };
        this.onCloseFullyCustomized = () => {
            this.setState({
                fullyCustomizedVisible: false,
            });
        };
        this.onOpenTextCustomized = () => {
            this.setState({
                textCustomizedVisible: true,
            });
        };
        this.onCloseTextCustomized = () => {
            this.setState({
                textCustomizedVisible: false,
            });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement(Button, { onClick: this.onOpenFullyCustomized, type: "primary" }, "Fully Customized Footer"),
            React.createElement("br", null),
            React.createElement("br", null),
            React.createElement(Dialog, { title: "Welcome to Alibaba.com", footer: React.createElement(Button, { warning: true, type: "primary", onClick: this.onCloseFullyCustomized }, "Customize footer"), visible: this.state.fullyCustomizedVisible, onOk: this.onCloseFullyCustomized, onCancel: this.onCloseFullyCustomized, onClose: this.onCloseFullyCustomized }, "Start your business here by searching a popular product"),
            React.createElement(Button, { onClick: this.onOpenTextCustomized, type: "primary" }, "Text Only Customize"),
            React.createElement(Dialog, { title: "Welcome to Alibaba.com", visible: this.state.textCustomizedVisible, onOk: this.onCloseTextCustomized, onCancel: this.onCloseTextCustomized, onClose: this.onCloseTextCustomized, okProps: { children: 'Custom OK', className: 'asdf' }, cancelProps: { children: 'Custom Cancel' } }, "Start your business here by searching a popular product")));
    }
}
ReactDOM.render(React.createElement(Demo, null), document.getElementById('dialog-demo-3'));
