import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import { initI18n } from '@/lib/i18n'

// Translations load before the first render so the UI never flashes English.
// If a catalogue fails to load, render anyway: i18next falls back to English.
void initI18n().finally(() => {
  createRoot(document.getElementById('root')!).render(
    <StrictMode>
      <App />
    </StrictMode>,
  )
})
