import React from 'react';
import { Routes, Route, Navigate } from 'react-router-dom';
import Layout from './components/Layout';
import Home from './pages/Home';
import Login from './pages/Login';
import Dashboard from './pages/Dashboard';
import SearchTexts from './pages/SearchTexts';
import TutorialTasks from './pages/TutorialTasks';
import WeeklyPractice from './pages/WeeklyPractice';
import VoteResults from './pages/VoteResults';
import Toolkit from './pages/Toolkit';
import Manage from './pages/Profile';
import Slides from './pages/Slides';
import Feedback from './pages/Feedback';

const App: React.FC = () => {
  return (
    <Routes>
      <Route path="/" element={<Home />} />
      <Route path="/login" element={<Login />} />
      <Route 
        path="/dashboard" 
        element={
          <Layout>
            <Dashboard />
          </Layout>
        } 
      />
      <Route 
        path="/search" 
        element={
          <Layout>
            <SearchTexts />
          </Layout>
        } 
      />
      <Route 
        path="/tutorial-tasks" 
        element={
          <Layout>
            <TutorialTasks />
          </Layout>
        } 
      />
      <Route 
        path="/weekly-practice" 
        element={
          <Layout>
            <WeeklyPractice />
          </Layout>
        } 
      />
      <Route 
        path="/votes" 
        element={
          <Layout>
            <VoteResults />
          </Layout>
        } 
      />
      <Route 
        path="/toolkit" 
        element={
          <Layout>
            <Toolkit />
          </Layout>
        } 
      />
      <Route 
        path="/slides" 
        element={
          <Layout>
            <Slides />
          </Layout>
        } 
      />
      <Route 
        path="/feedback" 
        element={
          <Layout>
            <Feedback />
          </Layout>
        } 
      />
      <Route 
        path="/manage" 
        element={
          <Layout>
            <Manage />
          </Layout>
        } 
      />
      <Route path="*" element={<Navigate to="/" replace />} />
    </Routes>
  );
};

export default App; 