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

@observer
export default class BaseInfo extends Component{
    render(){
		// const {FormInfo} = window.weaHrmComsPublic;
        const {
            store,
            tabContent
        } = this.props;
        const {
            formTarget,
            custLabelCol,
            itemRender,
            childrenComponents,
            workdaySettingData,
            bChange
            // refreshTab
        } = store;
        const {
            baseForm: form,
            baseFormFields: fields
        } = formTarget;
        const className = classnames({
			['tabPane']: tabContent || false,
            ['tabPane-dialog']: tabContent || false,
            ['dCom']: !(tabContent || false)
        })

        return (
            <div className={className}>
                <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@03k6z3`} height={'100%'}>
                    <FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@0q9p46`} 
                        className='formComponent' 
                        center={false} 
                        custLabelCol={custLabelCol} 
                        form={form} 
                        formFields={fields} 
                        itemRender={itemRender}
                        childrenComponents={childrenComponents()} />
                </WeaNewScroll>
                <SerialSetting ecId={`${this && this.props && this.props.ecId || ''}_SerialSetting@jukdt3`} store={store} />
            </div>
        )
    }
}