import { Routes, Route } from 'react-router-dom';
import Layout from './components/Layout';
import Index from './pages/Index';
import Mietkatalog from './pages/Mietkatalog';
import EquipmentDetail from './pages/EquipmentDetail';
import Kontakt from './pages/Kontakt';
import Warenkorb from './pages/Warenkorb';
import Admin from './pages/Admin';
import Referenzen from './pages/Referenzen';
import Impressum from './pages/Impressum';
import Datenschutz from './pages/Datenschutz';
import AGB from './pages/AGB';
import ErrorPage from './pages/ErrorPage';

export default function App() {
  return (
    <Routes>
      <Route element={<Layout />}>
        <Route path="/" element={<Index />} />
        <Route path="/mietkatalog" element={<Mietkatalog />} />
        <Route path="/mietkatalog/:id" element={<EquipmentDetail />} />
        <Route path="/kontakt" element={<Kontakt />} />
        <Route path="/warenkorb" element={<Warenkorb />} />
        <Route path="/admin" element={<Admin />} />
        <Route path="/referenzen" element={<Referenzen />} />
        <Route path="/impressum" element={<Impressum />} />
        <Route path="/datenschutz" element={<Datenschutz />} />
        <Route path="/agb-vermietung" element={<AGB />} />
        <Route path="*" element={<ErrorPage />} />
      </Route>
    </Routes>
  );
}
