import {
	observer
} from 'mobx-react';
import {
	WeaTop,
	WeaRightMenu
} from 'ecCom';

@observer
export default class Top extends React.Component {
	render() {
		const {
			store,
		} = this.props, {
			title,
			loading,
			topProps,
			buttons,
			dropMenuDatas
		} = store;

		return (
			<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@mynwri`}
				{...topProps}
				title={title}
				buttons={buttons}
				dropMenuDatas={dropMenuDatas}
				loading={loading}
			>
				<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@vn2di2`} datas={dropMenuDatas}>
					{this.props.children}
				</WeaRightMenu>
			</WeaTop>
		);
	}
}