import { createRoot } from 'react-dom/client'
import { BrowserRouter as Router } from 'react-router-dom'
import YaThemeModeContextProvider from '@/components/context/YaThemeProdiver'
import YaLocalesContextProvider from './components/context/YaLocalesProvider'
import App from './App'
import './global.css'
import { setupMSW } from './mocks/browser'

const container = document.getElementById('root')
const root = createRoot(container!)
setupMSW()

root.render(
  <YaThemeModeContextProvider>
    <YaLocalesContextProvider>
      <Router>
        <App />
      </Router>
    </YaLocalesContextProvider>
  </YaThemeModeContextProvider>,
)
