import React from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";

import ConnectWallet from "./pages/ConnectWallet";
import SignWithNitroKey from "./pages/SignWithNitroKey";
import SignWithCosmos from "./pages/SignWithCosmos";
import PageNotFound from "./pages/PageNotFound";
import OnboardingSuccess from "./pages/OnboardingSuccess";
import SignPageLayout from "./layout/SignPageLayout";
import UserVerification from "./pages/UserVerification";
import TermsAndConditions from "./pages/TermsAndConditions";
import Header from "./components/Header";
import { WalletConnectProvider } from "./context/WalletConnectContext";

function App() {
  return (
    <Router>
      <Header />
      <WalletConnectProvider>
        <Routes>
          <Route path="/" element={<TermsAndConditions />} />
          <Route
            path="/user-verification"
            element={<UserVerification />}
          />
          <Route path="/connect-wallet" element={<ConnectWallet />} />
          <Route element={<SignPageLayout />}>
            <Route path="/sign-with-nitro-key" element={<SignWithNitroKey />} />
            <Route
              path="/sign-with-cosmos"
              element={<SignWithCosmos />}
            />
            <Route
              path="/onboarding-success"
              element={<OnboardingSuccess />}
            ></Route>
          </Route>
          <Route path="*" element={<PageNotFound />} />
        </Routes>
      </WalletConnectProvider>
    </Router>
  );
}

export default App;
