import React, {
	Component
} from 'react';
import {
	inject,
	observer
} from 'mobx-react';
import {
	WeaLeftRightLayout
} from 'ecCom';
import LeftContainer from './AdjustLeftContainer';
import RightContainer from './AdjustRightContainer';
import {
	i18n
} from '../../../public/i18n';

@inject('hrmBatchAdjust')
@observer
export default class Adjust extends Component {
	constructor(props) {
		super(props);
	}

	componentDidMount() {
		const {
			hrmBatchAdjust,
			rootStore,
			router
		} = this.props;
		rootStore && hrmBatchAdjust.setRootStore(rootStore, router);
	}

	componentWillReceiveProps(nextProps) {}

	render(){
		const comProps = {
			store: this.props.hrmBatchAdjust,
			routeProps: this.props.routeProps
		}
		const {
			rootStore
		} = this.props;

		return (
			<div className='adjust'>
				<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@gqbekl`} leftCom={(<LeftContainer ecId={`${this && this.props && this.props.ecId || ''}_LeftContainer@i69ojq`} {...comProps}/>)}>
					<RightContainer ecId={`${this && this.props && this.props.ecId || ''}_RightContainer@0abfh1`} {...comProps}/>
				</WeaLeftRightLayout>
			</div>
		)
	}
}