import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import { Agentation } from 'agentation'
import './index.css'
import App from './App.tsx'
import { AuthProvider } from './components/AuthContext';
import { ProductAccessibilityGate } from './components/ProductAccessibilityGate';
import { ThemeProvider } from './components/theme/ThemeProvider';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <ProductAccessibilityGate>
      <ThemeProvider>
        <AuthProvider>
          <App />
        </AuthProvider>
      </ThemeProvider>
    </ProductAccessibilityGate>
    {import.meta.env.DEV && (
      <div style={{ position: 'relative', zIndex: 2147483647 }}>
        <Agentation />
      </div>
    )}
  </StrictMode>,
)
