import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { Toaster } from 'react-hot-toast';
import Layout from './components/Layout';
import { NotificationProvider } from './components/NotificationCenter';
import Dashboard from './pages/DashboardSimples';
import Produtos from './pages/Produtos';
import Clientes from './pages/Clientes';
import Fornecedores from './pages/Fornecedores';
import Despesas from './pages/Despesas';
import Vendas from './pages/Vendas';
import PedidosCatalogo from './pages/PedidosCatalogo';
import Devolucoes from './pages/Devolucoes';
import Emprestimos from './pages/Emprestimos';
import SiteCatalogo from './pages/SiteCatalogo';
import Configuracoes from './pages/Configuracoes';
import './App.css';

function App() {
  return (
    <Router>
      <NotificationProvider>
        <div className="App">
          <Toaster 
            position="top-right"
            toastOptions={{
              duration: 4000,
              style: {
                background: '#363636',
                color: '#fff',
              },
            }}
          />
          <Layout>
          <Routes>
            <Route path="/" element={<Dashboard />} />
            <Route path="/produtos" element={<Produtos />} />
            <Route path="/clientes" element={<Clientes />} />
            <Route path="/fornecedores" element={<Fornecedores />} />
            <Route path="/despesas" element={<Despesas />} />
            <Route path="/vendas" element={<Vendas />} />
            <Route path="/pedidos" element={<PedidosCatalogo />} />
            <Route path="/devolucoes" element={<Devolucoes />} />
            <Route path="/emprestimos" element={<Emprestimos />} />
            <Route path="/site/catalogo" element={<SiteCatalogo />} />
            <Route path="/configuracoes" element={<Configuracoes />} />
          </Routes>
          </Layout>
        </div>
      </NotificationProvider>
    </Router>
  );
}

export default App;
