import './demo6.css';
import Nav from '..';
import Radio from '../../radio';
import React from 'react';
import ReactDOM from 'react-dom';
const { Item, SubNav } = Nav;
class App extends React.Component {
    constructor(props) {
        super(props);
        this.state = {
            popupAlign: 'outside',
        };
    }
    setValue(popupAlign) {
        this.setState({
            popupAlign,
        });
    }
    render() {
        const { popupAlign } = this.state;
        return (React.createElement("div", null,
            React.createElement("div", { className: "demo-ctl" },
                React.createElement(Radio.Group, { shape: "button", size: "medium", value: popupAlign, onChange: this.setValue.bind(this) },
                    React.createElement(Radio, { value: "follow" }, "popupAlign=\"follow\""),
                    React.createElement(Radio, { value: "outside" }, "popupAlign=\"outside\""))),
            React.createElement(Nav, { style: { height: 400, width: 240 }, mode: "popup", popupAlign: popupAlign },
                React.createElement(SubNav, { key: "sub-nav-1", label: "Sub Nav 1" },
                    React.createElement(Item, { key: "1" }, "Item 1")),
                React.createElement(SubNav, { key: "sub-nav-2", label: "Sub Nav 2" },
                    React.createElement(Item, { key: "1" }, "Item 1"),
                    React.createElement(Item, { key: "2" }, "Item 2")),
                React.createElement(SubNav, { key: "sub-nav-3", label: "Sub Nav 3" },
                    React.createElement(Item, { key: "1" }, "Item 1"),
                    React.createElement(Item, { key: "2" }, "Item 2"),
                    React.createElement(Item, { key: "3" }, "Item 3")),
                React.createElement(SubNav, { key: "sub-nav-4", label: "Sub Nav 4" },
                    React.createElement(Item, { key: "1" }, "Item 1"),
                    React.createElement(Item, { key: "2" }, "Item 2"),
                    React.createElement(Item, { key: "3" }, "Item 3"),
                    React.createElement(Item, { key: "4" }, "Item 4")))));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('nav-demo-6'));
