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

@observer
export default class AttendanceType extends Component{
    render(){
		// const {FormInfo} = window.weaHrmComsPublic;
        const {
            store
        } = this.props;
        const {
            formTarget,
            custLabelCol,
            itemRender,
            childrenComponents,
            refreshTab,
            locationTableMultiDelete,
            wifiTableMultiDelete
        } = store;
        const {
            kqTypeForm: form,
            kqTypeFormFields: fields
        } = formTarget;
        const className = classnames({
			['tabPane']: true,
            ['tabPane-dialog']: true,
        })

        return (
            <div className={className}>
                <WeaNewScroll ecId={`${this && this.props && this.props.ecId || ''}_WeaNewScroll@kffmyy`} height={'100%'}>
                    <FormInfo ecId={`${this && this.props && this.props.ecId || ''}_FormInfo@1shhry`} 
                        className='formComponent' 
                        center={false} 
                        custLabelCol={custLabelCol} 
                        form={form} 
                        formFields={fields} 
                        itemRender={itemRender}
                        childrenComponents={childrenComponents()} />
                    <div id="downloadDiv" style={{display: 'none'}}>
                    </div>
                </WeaNewScroll>
                <LocationEdit ecId={`${this && this.props && this.props.ecId || ''}_LocationEdit@u8laa7`} store={store} />
                <WifiEdit ecId={`${this && this.props && this.props.ecId || ''}_WifiEdit@x6uhzh`} store={store} />
            </div>
        )
    }
}