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

@observer
export default class CreateTemplate extends Component{
    render(){
        const {
			store
        } = this.props;
        const {createTemplateDialogProps, formTarget} = store;
        
        const {
            createTemplateForm: form,
            createTemplateFormFields: fields
        } = formTarget;

        return (
            <WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@eqwjfx`} {...createTemplateDialogProps}>
                <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@reph85`} height={'100%'}>
                    <FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@w7am1a`} 
                        className='formComponent' 
                        center={false} 
                        form={form} 
                        formFields={fields} />
                </WeaNewScroll>
            </WeaDialog>
        )
    }
}