import React from 'react';
import {batch, shallowEqual,connect, useSelector, useDispatch} from 'react-redux'
import * as state from './state.js'
import * as Common from './common'
import * as Palette from './Palette'
import {StateTree} from './Tree'
const fs = require('fs')
import './mainWindow.modules.scss'

export const externalNodeType = 'Operation'

export const MainWindow = (props)=> {
	const isBackdropActivated = useSelector(state => (state).UIState.isBackdropActivated)
	const isAddSqlActivated = useSelector(state => (state).UIState.isAddSqlActivated)

	const emptyNameActivated = useSelector(state => (state ).UIState.emptyNameActivated)
	return <div className={Common.classNames({
		[props.className]: props.className,
		mainWindow: true,
		isBackdropActivatedTree: isBackdropActivated,
		isAddSqlActivatedTree:isAddSqlActivated ,
		emptyNameActivatedMainWindow:emptyNameActivated
	})}>
	<StateTree />
	</div >
}
export const StateMainWindow = MainWindow


