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

import Tab from './Tab';
import Table from './Table';

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

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

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

		return (
			<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@evcgsg`} 
               {...topProps}
               loading={toploading}
               buttons={topButtons}
               dropMenuDatas={dropMenuDatas}
            >
            	<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@r49zwv`} datas={dropMenuDatas}>
	            	<Tab ecId={`${this && this.props && this.props.ecId || ''}_Tab@6fn9wo`} />
	            	<Table ecId={`${this && this.props && this.props.ecId || ''}_Table@b6drwf`} />
            	</WeaRightMenu>
            </WeaTop>
		);
	}

}

export default Top;