import './demo2.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 = {
            type: 'normal',
        };
        this.changeType = type => {
            this.setState({
                type,
            });
        };
    }
    render() {
        const { type } = this.state;
        return (React.createElement("div", null,
            React.createElement("div", { className: "demo-ctl" },
                React.createElement(Radio.Group, { shape: "button", size: "medium", value: type, onChange: this.changeType },
                    React.createElement(Radio, { value: "normal" }, "type=\"normal\""),
                    React.createElement(Radio, { value: "primary" }, "type=\"primary\""),
                    React.createElement(Radio, { value: "secondary" }, "type=\"secondary\""),
                    React.createElement(Radio, { value: "line" }, "type=\"line\""))),
            React.createElement(Nav, { style: { width: '200px' }, type: type, defaultOpenAll: true, size: 'medium' },
                React.createElement(Item, { icon: "account" }, "Navigation One"),
                React.createElement(Item, { icon: "account" }, "Navigation Two"),
                React.createElement(Item, { icon: "account" }, "Navigation Three"),
                React.createElement(Item, { icon: "account" }, "Navigation Four"),
                React.createElement(Item, { icon: "account" },
                    React.createElement("a", { href: "111111111" }, "Navigation Five")),
                React.createElement(SubNav, { icon: "account", label: "Sub Nav" },
                    React.createElement(SubNav, { icon: "account", label: "Sub item1 Nav" },
                        React.createElement(Item, { icon: "account" },
                            React.createElement("a", { href: "222222" }, "Item 1")),
                        React.createElement(Item, { icon: "account" }, "Item 2")),
                    React.createElement(Item, { icon: "account" }, "Item 2"),
                    React.createElement(Item, { icon: "account" }, "Item 3"),
                    React.createElement(Item, { icon: "account" }, "Item 4")))));
    }
}
ReactDOM.render(React.createElement(App, null), document.getElementById('nav-demo-2'));
