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

import Tab from './Tab';

@inject('hrmLevelProtection')
@observer
export default class Top extends React.Component {
	constructor(props) {
		super(props);
	}

	componentDidMount() {
		this.props.hrmLevelProtection.getRightMenu();
	}

	render() {
		const {
			topProps,
			toploading,
			topButtons,
			dropMenuDatas,
		} = this.props.hrmLevelProtection;

		return (
			<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@e2e72t`} 
               {...topProps}
               loading={toploading}
               buttons={topButtons}
               dropMenuDatas={dropMenuDatas}
            >
            	<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@ulsizo`} datas={dropMenuDatas}>
            		<Tab ecId={`${this && this.props && this.props.ecId || ''}_Tab@4blbym`} />
            	</WeaRightMenu>
            </WeaTop>
		);
	}

}