import { Toaster } from "@/components/ui/toaster";
import { Toaster as Sonner } from "@/components/ui/sonner";
import { TooltipProvider } from "@/components/ui/tooltip";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { ThemeProvider } from "@/components/ThemeProvider";
import Index from "./pages/Index";
import ReleaseDetail from "./pages/ReleaseDetail";
import PressExample from "./pages/PressExample";
import Preise from "./pages/Preise";
import UeberUns from "./pages/UeberUns";
import FAQ from "./pages/FAQ";
import Kontakt from "./pages/Kontakt";
import KategorieIT from "./pages/KategorieIT";
import NotFound from "./pages/NotFound";

const queryClient = new QueryClient();

const App = () => (
  <QueryClientProvider client={queryClient}>
    <ThemeProvider defaultTheme="light" storageKey="ui-theme">
      <TooltipProvider>
        <Toaster />
        <Sonner />
        <BrowserRouter>
          <Routes>
            <Route path="/" element={<Index />} />
            <Route path="/release/:slug" element={<ReleaseDetail />} />
            <Route path="/beispiel" element={<PressExample />} />
            <Route path="/preise" element={<Preise />} />
            <Route path="/ueber-uns" element={<UeberUns />} />
            <Route path="/faq" element={<FAQ />} />
            <Route path="/kontakt" element={<Kontakt />} />
            <Route path="/kategorie/it" element={<KategorieIT />} />
            {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */}
            <Route path="*" element={<NotFound />} />
          </Routes>
        </BrowserRouter>
      </TooltipProvider>
    </ThemeProvider>
  </QueryClientProvider>
);

export default App;
