const MOBILE_NO_APP_RAIL_PREFIXES = ['/login', '/register'] as const;
const MOBILE_EMBEDDED_RAIL_PREFIXES = [
  '/room/',
  '/dm',
  '/pm',
  '/call'
] as const;

/** Whether the mobile app shell should render the global servers rail for a route. */
export function shouldShowMobileAppServersRail(routePath: string): boolean {
  if (MOBILE_NO_APP_RAIL_PREFIXES.some((prefix) => routePath.startsWith(prefix))) {
    return false;
  }

  if (MOBILE_EMBEDDED_RAIL_PREFIXES.some((prefix) => routePath.startsWith(prefix))) {
    return false;
  }

  return true;
}
