import './App.css'
import React from 'react'
import { BrowserRouter as Router } from 'react-router-dom'
import { Provider } from 'react-redux'
import { MainLayout } from './layouts'
import { AppRoutes } from './routes/AppRoutes'
import { AuthProvider } from './auth/AuthContext'
import ToastWrapper from './components/ToastWrapper/ToastWrapper'
import { store } from './store'

const App: React.FC = () => {
  return (
    <Provider store={store}>
      <ToastWrapper>
        <AuthProvider>
          <Router basename="/sdream-ai">
            <MainLayout>
              <AppRoutes />
            </MainLayout>
          </Router>
        </AuthProvider>
      </ToastWrapper>
    </Provider>

  )
}

export default App
