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

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

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

	componentWillReceiveProps(nextProps) {}

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

		return (
			<div className='adjust'>
				<WeaLeftRightLayout ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftRightLayout@1b5b83`} leftCom={(<LeftContainer ecId={`${this && this.props && this.props.ecId || ''}_LeftContainer@xs1iip`} {...comProps}/>)}>
					<RightContainer ecId={`${this && this.props && this.props.ecId || ''}_RightContainer@bd3lix`} {...comProps}/>
				</WeaLeftRightLayout>
			</div>
		)
	}
}