import { FC, memo } from "react"
import { useSelector } from "react-redux"
import { isOpenLeftPanel } from "@/redux/config/configSelector"
// import DataWorkspace  from  "../DataWorkspace/index"
// import ToolBar from "./Components/ToolBar"
import { leftPanelContainerStyle } from "./style"
import { DataWorkspace } from "../DataWorkspace"


export const LeftPanel: FC = () => {
  const showLeftPanel = useSelector(isOpenLeftPanel)

  return (
    <div css={leftPanelContainerStyle}>
      {/* <ToolBar /> */}
      {showLeftPanel && 
      <DataWorkspace />}
    </div>
  )
}

// eslint-disable-next-line react-refresh/only-export-components
export default memo(LeftPanel)
