import React from 'react';
import { Menu, Icon } from 'antd';
import '../leftTab.less';
const SubMenu = Menu.SubMenu;
const MenuItemGroup = Menu.ItemGroup;


const LeftTab = React.createClass({
    getInitialState() {
        return {
            current: 'patent',
        };
    },
    handleClick(e) {
        this.props.handlekey(e.key);
        this.setState({
            current: e.key,
        });
    },
    componentWillMount() {
        if (window.location.hash) {
            this.state.current = window.location.hash.substr(1);
        };
    },
    render() {
        return (
            <Menu onClick={this.handleClick}
                selectedKeys={[this.state.current]}
                defaultOpenKeys={["sub1", "sub2", "sub3"]}
                mode="vertical"
                className="account-left"
                mode="inline"
            >
                <SubMenu key="sub1" title={<span>知识产权申请</span>}>
                    <Menu.Item key="patent">
                        专利申请
                    </Menu.Item>
                    <Menu.Item key="software">
                        软著申请
                    </Menu.Item>
                </SubMenu>
                <SubMenu key="sub2" title={<span>高企认定</span>}>
                    <Menu.Item key="standard">
                        标准制定情况
                    </Menu.Item>
                    <Menu.Item key="activity">
                        企业研究开发活动
                    </Menu.Item>
                </SubMenu>
                <SubMenu key="sub3" title={<span>科技项目申报</span>}>
                </SubMenu>
            </Menu>
        );
    }
});

export default LeftTab;