import './demo5.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 = {
            openMode: 'single',
        };
    }
    setValue(openMode) {
        this.setState({
            openMode,
        });
    }
    render() {
        const { openMode } = this.state;
        return (React.createElement("div", null,
            React.createElement("div", { className: "demo-ctl" },
                React.createElement(Radio.Group, { shape: "button", size: "medium", value: openMode, onChange: this.setValue.bind(this) },
                    React.createElement(Radio, { value: "single" }, "openMode=\"single\""),
                    React.createElement(Radio, { value: "multiple" }, "openMode=\"multiple\""))),
            React.createElement(Nav, { style: { width: 240 }, openMode: openMode, defaultOpenKeys: ['0-0'] },
                React.createElement(SubNav, { label: "Sub Nav 1" },
                    React.createElement(Item, null, "Item 1")),
                React.createElement(SubNav, { label: "Sub Nav 2" },
                    React.createElement(Item, null, "Item 1"),
                    React.createElement(Item, null, "Item 2"),
                    React.createElement(SubNav, { label: "Sub Nav 1" },
                        React.createElement(Item, null, "Item 1"),
                        React.createElement(Item, null, "Item 2")),
                    React.createElement(SubNav, { label: "Sub Nav 2" },
                        React.createElement(Item, null, "Item 1"),
                        React.createElement(Item, null, "Item 2"))),
                React.createElement(SubNav, { label: "Sub Nav 3" },
                    React.createElement(Item, null, "Item 1"),
                    React.createElement(Item, null, "Item 2"),
                    React.createElement(Item, null, "Item 3"),
                    React.createElement(SubNav, { label: "Sub Nav 1" },
                        React.createElement(Item, null, "Item 1"),
                        React.createElement(Item, null, "Item 2"),
                        React.createElement(Item, null, "Item 3")),
                    React.createElement(SubNav, { label: "Sub Nav 2" },
                        React.createElement(Item, null, "Item 1"),
                        React.createElement(Item, null, "Item 2"),
                        React.createElement(Item, null, "Item 3")),
                    React.createElement(SubNav, { label: "Sub Nav 3" },
                        React.createElement(Item, null, "Item 1"),
                        React.createElement(Item, null, "Item 2"),
                        React.createElement(Item, null, "Item 3"))),
                React.createElement(Item, null, "Item"))));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('nav-demo-5'));
