import Button from '../../button';
import Dropdown from '..';
import Menu from '../../menu';
import React from 'react';
import ReactDOM from 'react-dom';
const menu = (React.createElement(Menu, null,
    React.createElement(Menu.Item, null, "Option 1"),
    React.createElement(Menu.Item, null, "Option 2"),
    React.createElement(Menu.Item, null, "Option 3"),
    React.createElement(Menu.Item, null, "Option 4")));
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            visible: false,
        };
        this.toggleVisible = () => {
            this.setState({
                visible: !this.state.visible,
            });
        };
        this.onVisibleChange = visible => {
            this.setState({
                visible,
            });
        };
    }
    render() {
        return (React.createElement("div", null,
            React.createElement("div", { style: { marginBottom: '20px' } },
                React.createElement(Button, { onClick: this.toggleVisible, ref: "button" }, "Toggle Overlay")),
            React.createElement(Dropdown, { trigger: React.createElement("span", null, "Hello dropdown"), triggerType: "click", visible: this.state.visible, onVisibleChange: this.onVisibleChange, safeNode: () => this.refs.button }, menu)));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('dropdown-demo-3'));
