import {
	inject,
	observer,
} from 'mobx-react';
import Head from "./head/index.js";
import Body from "./body/index.js";

@observer
export default class BirthEditor extends React.Component {
	componentDidMount() {
		const {
			store
		} = this.props, {
			init,
			handleKeyDown,
		} = store;
		
		init();

		$(document).keypress(handleKeyDown);
	}


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

		return (
			<div style={{height: "100%",overflow:"hidden"}} >
				<Head ecId={`${this && this.props && this.props.ecId || ''}_Head@itrsbs`} store={store}/>
				<Body ecId={`${this && this.props && this.props.ecId || ''}_Body@e8lqey`} store={store}/>
			</div>
		);
	}
}