import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App.tsx';
import { ThemeProvider } from '@mui/material/styles';
import CssBaseline from '@mui/material/CssBaseline';
import theme from './theme/theme';
import { AuthProvider } from './contexts/AuthContext'; // Importar AuthProvider

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <ThemeProvider theme={theme}>
      <AuthProvider> {/* Envolver con AuthProvider */}
        <CssBaseline />
        <App />
      </AuthProvider> {/* Cerrar AuthProvider */}
    </ThemeProvider>
  </React.StrictMode>,
);