import { Route, Routes } from "react-router-dom";
import TopPage from "pages/TopPage";
import LoginPage from "pages/LoginPage";
import SamplePage from "pages/SamplePage";
import { AuthErrorPage } from "pages/ErrorPage";
import { NotFoundPage } from "pages/ErrorPage/notFound";
import { RouteAuthGuard } from "components/auth/routeAuthGuard";
import SignupPage from "pages/SignupPage";

const AppRouter: React.FC = () => (
  <Routes>
    <Route path="/" element={<TopPage />} />
    <Route path="/login" element={<LoginPage />} />
    <Route path="/authError" element={<AuthErrorPage />} />
    <Route path="/signup" element={<SignupPage completeTo="/" />} />
    <Route
      path="/xxx"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    {/* XXX ヘッダーの挙動確認のため仮のページを作成 */}
    <Route
      path="/account"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    <Route
      path="/user"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    <Route
      path="/dictations"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    <Route
      path="/license"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    <Route
      path="/workflow"
      element={<RouteAuthGuard component={<SamplePage />} />}
    />
    <Route path="*" element={<NotFoundPage />} />
  </Routes>
);

export default AppRouter;
