
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import Index from './pages/Index';
import Settings from './pages/Settings';
import Login from './pages/Login';
import Register from './pages/Register';
import ForgotPassword from './pages/ForgotPassword';
import NotFound from './pages/NotFound';
import SecurityPrivacySettings from './pages/SecurityPrivacySettings';
import ProfileManagement from './pages/ProfileManagement';
import PaymentMethods from './pages/PaymentMethods';
import NotificationSettings from './pages/NotificationSettings';
import HelpSupport from './pages/HelpSupport';
import Analytics from './pages/Analytics';
import Transactions from './pages/Transactions';
import { AuthProvider } from './contexts/auth';
import { BudgetProvider } from './contexts/budget';
import { Toaster } from '@/components/ui/toaster';
import { Toaster as SonnerToaster} from '@/components/ui/sonner';
import SafeAreaContainer from './components/SafeAreaContainer';

function App() {
  return (
    <AuthProvider>
      <BudgetProvider>
        <Router>
          <SafeAreaContainer className="min-h-screen bg-neuro-background">
            <Routes>
              <Route path="/" element={<Index />} />
              <Route path="/login" element={<Login />} />
              <Route path="/register" element={<Register />} />
              <Route path="/forgot-password" element={<ForgotPassword />} />
              <Route path="/settings" element={<Settings />} />
              <Route path="/security-privacy" element={<SecurityPrivacySettings />} />
              <Route path="/profile" element={<ProfileManagement />} />
              <Route path="/payment-methods" element={<PaymentMethods />} />
              <Route path="/notifications" element={<NotificationSettings />} />
              <Route path="/help-support" element={<HelpSupport />} />
              <Route path="/analytics" element={<Analytics />} />
              <Route path="/transactions" element={<Transactions />} />
              <Route path="*" element={<NotFound />} />
            </Routes>
          </SafeAreaContainer>
          <Toaster />
          <SonnerToaster />
        </Router>
      </BudgetProvider>
    </AuthProvider>
  );
}

export default App;
