/**
 * Application Routes Configuration
 *
 * Defines the main routing structure for the kiosk application using Wouter.
 * Hash-based routing is used for compatibility with static hosting environments.
 */

/* Routing library */
import { Router, Switch, Route } from "wouter";
import { useHashLocation } from "wouter/use-hash-location";

/* Context providers */
import { KioskDataProvider } from "@/contexts/kiosk-data-context";

/* Layout wrapper */
import { Layout } from "@/components/kiosk/layout";

/* Page components */
import { Bulletin } from "@/routes/bulletin";
import { Directory } from "@/routes/directory";
import { Navigation } from "@/routes/navigation";
import { About } from "@/routes/about";

const Routes = () => (
  <KioskDataProvider>
    <Router hook={useHashLocation}>
      <Layout>
        <Switch>
          <Route path="/" component={Bulletin} />
          <Route path="/directory" component={Directory} />
          <Route path="/navigation" component={Navigation} />
          <Route path="/about" component={About} />
          <Route component={() => <>Not Found</>} />
        </Switch>
      </Layout>
    </Router>
  </KioskDataProvider>
);

export default Routes;
