import {
  index,
  layout,
  route,
  type RouteConfig
} from '@react-router/dev/routes'

export default [
  layout('routes/layout.tsx', [
    index('routes/index.tsx'),
    route('certs', 'routes/certs.tsx'),
    route('history', 'routes/history.tsx'),
    route('settings', 'routes/settings/layout.tsx', [
      index('routes/settings/profile.tsx'),
      route('emails', 'routes/settings/emails/index.tsx'),
      route('emails/:code/verify', 'routes/settings/emails/verify.tsx'),
      route('password', 'routes/settings/password.tsx'),
      route('orgs', 'routes/settings/orgs.tsx')
    ]),
    route('konviva', 'routes/konviva.ts'),
    route('player/:id', 'routes/player.tsx'),
    route('proxy/*', 'routes/proxy.tsx'),
    route('api/*', 'routes/api.ts')
  ]),
  route('logout', 'routes/auth/logout.ts'),
  route('login', 'routes/auth/login.ts')
] satisfies RouteConfig
