import {
	observer
} from 'mobx-react';
import {
	WeaTop,
	WeaRightMenu,
	WeaLocaleProvider,
} from 'ecCom';
import Form from './Form';
const getLabel = WeaLocaleProvider.getLabel;

@observer
export default class Header extends React.Component {
	constructor(props) {
		super(props);
	}

	render() {
		const {
			store
		} = this.props, {
			TOP,
			pageStatus,
			dropMenuDatas,
			topButtons,
			triggerRefresh
		} = store;

		return (
			<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@gmvdtm`} 
               {...TOP}
               title={getLabel(506212, '组织字段显示设置')}
               loading={pageStatus}
               buttons={topButtons}
               dropMenuDatas={dropMenuDatas}
            >
            	<WeaRightMenu ecId={`${this && this.props && this.props.ecId || ''}_WeaRightMenu@m03jn7`} datas={dropMenuDatas}>
            		<Form ecId={`${this && this.props && this.props.ecId || ''}_Form@1valy3`} store={store}/>
            	</WeaRightMenu>
            </WeaTop>
		);
	}
}