/**
 * Merge route groups into the flat array expected by vue-router.
 *
 * Route modules are commonly exported as arrays so they can contain one or
 * more route records. Passing one of those arrays directly to the router
 * creates an invalid top-level route entry and can make the sidebar crash
 * while reading `route.path`.
 */
export function mergeRouteRecords(...routeGroups) {
  return routeGroups.flat()
}
