import "./assets/css/App.scss";
import Home from "./pages/Home.jsx";
import Single from "./pages/Single.jsx";
import Profile from "./pages/Profile.jsx";
import Country from "./pages/Country.jsx";
import Results from "./pages/Results.jsx";
import Test from "./pages/Test.jsx";
import { v4 as uuidv4 } from "uuid";
import Game from "./pages/Game.jsx";

import { useLocation, Routes, Route } from "react-router-dom";
import { AnimatePresence } from "framer-motion";

function App() {
	const location = useLocation();
	return (
		<AnimatePresence mode='wait'>
			<Routes location={location} key={location.pathname}>
				<Route path='/' element={<Home />} />
				<Route path='/select-profile' element={<Profile />} />
				<Route path='/select-country' element={<Country />} />
				<Route path='/play' element={<Game />} />
				<Route path='/results' element={<Results />} />
				<Route path='/test' element={<Test />} />
			</Routes>
		</AnimatePresence>
	);
}

export default App;
