import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Login from './pages/Login';
import Dashboard from './pages/Dashboard';
import ProtectedLayout from './layouts/ProtectedLayout';
import CategoryManager from './pages/Categories/CategoryManager';
import UserManager from './pages/Users/UserManager';
import DiagramPage from './pages/Diagram/DiagramPage';
import PricingManager from './pages/Pricing/PricingManager';
import PromotionsManager from './pages/Pricing/PromotionsManager';
import SalesByCategory from './pages/Reports/SalesByCategory';
import ModerationPage from './pages/Moderation/ModerationPage';
import ListingExplorer from './pages/Listings/ListingExplorer';
import AuditTimeline from './pages/Audit/AuditTimeline';
import ClientManager from './pages/Clients/ClientManager';
import CouponsPage from './pages/Coupons/CouponsPage';

function App() {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/login" element={<Login />} />

        <Route element={<ProtectedLayout />}>
          <Route path="/" element={<Dashboard />} />
          <Route path="/moderation" element={<ModerationPage />} />
          <Route path="/listings" element={<ListingExplorer />} />
          <Route path="/categories" element={<CategoryManager />} />
          <Route path="/clients" element={<ClientManager />} />
          <Route path="/users" element={<UserManager />} />
          <Route path="/diagram" element={<DiagramPage />} />
          <Route path="/pricing" element={<PricingManager />} />
          <Route path="/promotions" element={<PromotionsManager />} />
          <Route path="/coupons" element={<CouponsPage />} />
          <Route path="/reports/categories" element={<SalesByCategory />} />
          <Route path="/audit" element={<AuditTimeline />} />
        </Route>
      </Routes>
    </BrowserRouter>
  );
}

export default App;
