// Side-effect import first so the timing store records boot_start at the
// earliest possible point, before React mounts.
import '@/lib/hydrationTiming'
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import ErrorBoundary from './components/ErrorBoundary.tsx'
import { initializeDensity } from './hooks/use-density'
import { initializeTheme } from './hooks/use-theme'

initializeDensity()
initializeTheme()

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <ErrorBoundary>
      <App />
    </ErrorBoundary>
  </StrictMode>,
)
