// Local dev-reference copy — real scaffolds get this file's content from
// `generateAuthGuard()` in bin/cli.ts, not from this file on disk.
import React from 'react';
import { Routes, Route, Navigate, Outlet } from 'react-router-dom';
import { useAuth } from '../context/AuthContext';
import { LoginPage } from '../../pages/LoginPage';
// ─── Lazy page imports ────────────────────────────────────────────────────────
// Each route bundle is loaded only when the route is first visited. LoginPage
// is imported eagerly above since it's the first route rendered for a
// logged-out visitor (see docs/figma-make-compatibility.md #4).
const ForgotPasswordPage = React.lazy(() =>
import('../../pages/ForgotPasswordPage').then(m => ({ default: m.ForgotPasswordPage }))
);
const VerifyEmailPage = React.lazy(() =>
import('../../pages/VerifyEmailPage').then(m => ({ default: m.VerifyEmailPage }))
);
const ResetPasswordPage = React.lazy(() =>
import('../../pages/ResetPasswordPage').then(m => ({ default: m.ResetPasswordPage }))
);
const HomePage = React.lazy(() =>
import('../../pages/HomePage').then(m => ({ default: m.HomePage }))
);
const TemplatePage = React.lazy(() =>
import('../../pages/TemplatePage').then(m => ({ default: m.TemplatePage }))
);
const ShowcasePage = React.lazy(() =>
import('../../pages/ShowcasePage').then(m => ({ default: m.ShowcasePage }))
);
const AssistantPage = React.lazy(() =>
import('../../pages/AssistantPage').then(m => ({ default: m.AssistantPage }))
);
// FDM integration spike — not part of the CLI scaffold, see FdmAssistantPage.tsx.
const FdmAssistantPage = React.lazy(() =>
import('../../pages/FdmAssistantPage').then(m => ({ default: m.FdmAssistantPage }))
);
const SettingsPage = React.lazy(() =>
import('../../pages/SettingsPage').then(m => ({ default: m.SettingsPage }))
);
const LandingPage = React.lazy(() =>
import('../../pages/LandingPage').then(m => ({ default: m.LandingPage }))
);
// ─── Route guards ─────────────────────────────────────────────────────────────
// Layout routes +