import { AboutPage } from '../pages/about'
import { BlogsPage } from '../pages/blogs'
import { GamesPage } from '../pages/games'
import { HomePage } from '../pages/home'
import { InnerModPage } from '../pages/innerMod'
import { ModsPage } from '../pages/mods'
import { SettingsPage } from '../pages/settings'
import { SubmitModPage } from '../pages/submitMod'
import { WritePage } from '../pages/write'

export const appRoutes = {
  index: '/',
  home: '/home',
  games: '/games',
  mods: '/mods',
  modsInner: '/mods-inner/:nevent',
  about: '/about',
  blog: '/blog',
  submitMod: '/submit-mod',
  editMod: '/edit-mod/:nevent',
  write: '/write',
  settingsProfile: '/settings-profile',
  settingsRelays: '/settings-relays',
  settingsPreferences: '/settings-preferences',
  settingsAdmin: '/settings-admin'
}

export const getModsInnerPageRoute = (eventId: string) =>
  appRoutes.modsInner.replace(':nevent', eventId)

export const routes = [
  {
    path: appRoutes.index,
    element: <HomePage />
  },
  {
    path: appRoutes.home,
    element: <HomePage />
  },
  {
    path: appRoutes.games,
    element: <GamesPage />
  },
  {
    path: appRoutes.mods,
    element: <ModsPage />
  },
  {
    path: appRoutes.modsInner,
    element: <InnerModPage />
  },
  {
    path: appRoutes.about,
    element: <AboutPage />
  },
  {
    path: appRoutes.blog,
    element: <BlogsPage />
  },
  {
    path: appRoutes.submitMod,
    element: <SubmitModPage />
  },
  {
    path: appRoutes.editMod,
    element: <SubmitModPage />
  },
  {
    path: appRoutes.write,
    element: <WritePage />
  },
  {
    path: appRoutes.settingsProfile,
    element: <SettingsPage />
  },
  {
    path: appRoutes.settingsRelays,
    element: <SettingsPage />
  },
  {
    path: appRoutes.settingsPreferences,
    element: <SettingsPage />
  },
  {
    path: appRoutes.settingsAdmin,
    element: <SettingsPage />
  }
]
