import {
	inject,
	observer
} from 'mobx-react';
import {
	WeaTab,
} from 'ecCom';

import BirthdayRemind from './BirthdayRemind';
import EntryRemind from './EntryRemind';

@inject('hrmStaffCareReminder')
@observer
class Tab extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			hrmStaffCareReminder
		} = this.props, {
			tab,
			tabStaticProps,
			datas,
		} = hrmStaffCareReminder, {
			selectedKey
		} = tab;

		return (
			<div>
				<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@6jpb9d`}  {...tabStaticProps} {...tab} datas={datas}/>
				{selectedKey === '0' ? <BirthdayRemind ecId={`${this && this.props && this.props.ecId || ''}_BirthdayRemind@mcbk23`} /> : <EntryRemind ecId={`${this && this.props && this.props.ecId || ''}_EntryRemind@xcmx9z`} />}
			</div>
		)
	}
}

export default Tab