import { Route, Router } from "@solidjs/router";
import { BuilderFlow } from "./BuilderFlow";
import { RootLayout } from "./RootLayout";
import { StaticInfoPage } from "./pages/StaticInfoPage";

export function App() {
  return (
    <Router root={RootLayout}>
      <Route path="/" component={BuilderFlow} />
      <Route path="/r/:baseId/:variantId" component={BuilderFlow} />
      <Route path="/a-propos" component={() => <StaticInfoPage kind="about" />} />
      <Route path="/cgu" component={() => <StaticInfoPage kind="terms" />} />
      <Route path="/mentions-legales" component={() => <StaticInfoPage kind="legal" />} />
      <Route path="/confidentialite" component={() => <StaticInfoPage kind="privacy" />} />
      <Route path="*" component={() => <StaticInfoPage kind="notFound" />} />
    </Router>
  );
}
