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 Index from "./pages/Index";
import Viewer from "./pages/Viewer";
import XRSession from "./pages/XRSession";
import Watch from "./pages/Watch";
import MeetingRoom from "./pages/MeetingRoom";
import NotFound from "./pages/NotFound";
import QuestCubeLab from "./lab/QuestCubeLab";
import "@/lib/remoteLogger";

const queryClient = new QueryClient();

const App = () => (
  <QueryClientProvider client={queryClient}>
    <TooltipProvider>
      <Toaster />
      <Sonner />
      <BrowserRouter>
        <Routes>
          <Route path="/" element={<Index />} />
          <Route path="/viewer" element={<Viewer />} />
          <Route path="/xr" element={<XRSession />} />
          <Route path="/watch/:code" element={<Watch />} />
          <Route path="/meeting" element={<MeetingRoom />} />
          <Route path="/meeting/:roomId" element={<MeetingRoom />} />
          <Route path="/lab" element={<QuestCubeLab />} />
          <Route path="*" element={<NotFound />} />
        </Routes>
      </BrowserRouter>
    </TooltipProvider>
  </QueryClientProvider>
);

export default App;
