import type { RouteRecordRaw } from 'vue-router'

export const storesRouter: RouteRecordRaw[] = [
  { path: '/stores', name: 'storesIndex', component: () => import('../page/stores/StoresIndexPage.vue') },
  // The Batocera store had a page to itself until the RetroArch store joined it.
  // Both device names keep working as URLs — the old links, and the guess someone
  // makes after reading "RetroArch store" — and each lands on its own tab.
  { path: '/batocera', redirect: { name: 'storesIndex', query: { device: 'batocera' } } },
  { path: '/retroarch', redirect: { name: 'storesIndex', query: { device: 'retroarch' } } },
  { path: '/desktop', redirect: { name: 'storesIndex', query: { device: 'desktop' } } },
]
