import React, {
	Component
} from 'react';
import {
	Row,
	Col
} from 'antd';
import {WeaRightMenu} from 'ecCom';
import {
	Link
} from 'react-router';
import {addContentPath} from '../../util/index.js'

export default class Dashboard extends Component {
	constructor(props) {
		super(props);
	}

	componentDidMount() {}

	componentWillReceiveProps(nextProps) {}

	render(){
		const {
			store
		} = this.props;
		const {
			groupDef,
			routeProps
		} = store;
		return (
			<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@7hj3e3`} datas={[]}>
				<div className='dashboard'>
					{
						groupDef.map(group => {
							return (
								<div className='group'>
									<div className='item'>
										<div className='logo'>
											<img src={addContentPath(group.imgUrl)} />
											<div>{group.label()}</div>
										</div>
									</div>
									{
										group.btns.map((btn, index) => {
											return (
												<div className='item'>
													<div className='opBtn'>
														<div className='label'>{btn.label()}</div>
														<div className='link'>
															<Link ecId={`${this && this.props && this.props.ecId || ''}_Link@3myzof@${index}`} to={btn.linkTo}>{btn.label()}</Link>
														</div>
														<div className='tips'>{btn.tips()}</div>
													</div>
												</div>
											)
										})
									}
								</div>
							)
						})
					}
				</div>
			</WeaRightMenu>
		)
	}
}