import React, {
	Component
} from 'react';
import {
	observer
} from 'mobx-react';
import OrganizationTree from '../../../coms/OrganizationTree';
import Tabs from '../../../coms/Tabs';
import {
	cloneDeep
} from 'lodash';

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

	componentDidMount() {}

	componentWillReceiveProps(nextProps) {}

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

		let orgTreeProps = cloneDeep(store.orgTreeProps);

		switch (routeProps.params) {
			case 'subCompany':
				break;
			case 'department':
				orgTreeProps.isLoadSubDepartment = true;
				break;
			case 'resource':
				orgTreeProps.isLoadSubDepartment = true;
				break;
		}

		return (
			<div className="left">
				<OrganizationTree ecId={`${this && this.props && this.props.ecId || ''}_OrganizationTree@6wvcvl`} {...orgTreeProps} ref={dom => store.setTreeRef(dom)}/>
			</div>
		)
	}
}