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

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

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