'use client';
import { useState, useEffect } from 'react'
import { Fill, ReExtProvider } from '@sencha/reext'
Fill();

export default function RootLayout({ children }) {
  const [isClient, setIsClient] = useState(false)

  useEffect(() => {
    setIsClient(true)
  }, [])

  const ReExtData = {
    "sdkversion": "7.8.0", "toolkit": "classic", "theme": "classic",
    "packages": { "charts": false, "fontawesome": false, "ux": false, "calendar": false, "d3": false, "exporter": false, "pivot": false, "pivotd3": false, "pivotlocale": false, "froalaeditor": false },
    "rtl": false, "locale": "en", "debug": false, "urlbase": "./", "location": "remote", "overrides": false
  }
  if (!isClient) { return null }
  return (
    <html lang="en">
      <body>
        <ReExtProvider ReExtData={ReExtData} splash={true}>
          {children}
        </ReExtProvider>
      </body>
    </html>
  );
}
