import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.tsx'
import { setIntentosInfinitos } from './hooks/useIntentos'

// Activar intentos infinitos
setIntentosInfinitos(true)

// Simulador SCORM solo en desarrollo
if (import.meta.env.DEV) {
  const { Scorm12API } = await import('scorm-again')
  const api = new Scorm12API({})
  window.API = api
  api.lmsInitialize()
}

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