import React, {Component} from 'react';
import {observer} from 'mobx-react';
import {WeaDialog, WeaNewScroll} from 'ecCom';
import {FormInfo} from '../../../hrmComsPublic/index';

@observer
export default class CreateGroup extends Component{
    render(){
        const {
			store
        } = this.props;
        const {createFieldDefineDialogProps, formTarget, feildDefineFormItemRender} = store;
        
        const {
            createFieldDefineForm: form,
            createFieldDefineFormFields: fields
        } = formTarget;

        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@8v63w6`} {...createFieldDefineDialogProps} key={new Date().getTime()}>
                <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@541rr8`} height={'100%'}>
                    <FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@g0ptvy`} 
                        className='formComponent' 
                        center={false} 
                        form={form} 
                        formFields={fields} 
                        itemRender={feildDefineFormItemRender}/>
                </WeaNewScroll>
            </WeaDialog>
        )
    }
}