import React, {
	Component
} from 'react';
import {
	observer
} from 'mobx-react';
import {
	WeaRightMenu
} from 'ecCom';
import AdjustSubCompany from './AdjustSubCompany';
import AdjustDepartment from './AdjustDepartment';
import AdjustResource from './AdjustResource';

@observer
export default class AdjustLeftContainer extends Component {
	constructor(props) {
		super(props);
	}

	componentDidMount() {}

	componentWillReceiveProps(nextProps) {}

	render(){
		const {
			store,
			routeProps
		} = this.props;
		const menus = store.menus;

		let com = '';
		// com = <AdjustResource {...this.props} />
		switch (routeProps.params) {
			case 'subCompany':
				com = <AdjustSubCompany ecId={`${this && this.props && this.props.ecId || ''}_AdjustSubCompany@ht8eg0`} {...this.props} />
				break;
			case 'department':
				com = <AdjustDepartment ecId={`${this && this.props && this.props.ecId || ''}_AdjustDepartment@n07p7h`} {...this.props} />
				break;
			case 'resource':
				com = <AdjustResource ecId={`${this && this.props && this.props.ecId || ''}_AdjustResource@b1c7x0`} {...this.props} />
				break;
		}

		return (
			<div className="right">
			<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@pmt460`} datas={menus}>
			{com}
			</WeaRightMenu>
			</div>
		)
	}
}