import type { Role } from './db.js';

/**
 * The path the `/` route should redirect to for a given role, or `null` to
 * render the existing editorial home content in place.
 *
 *  - pilot → null   (keep existing /index.astro content — right audience for it)
 *  - cab   → /pulse (the member portal is the council's landing)
 *  - fenja → /pulse (admins see the member view by default; /admin is one click away)
 */
export function homeRouteForRole(role: Role): string | null {
  if (role === 'pilot') return null;
  return '/pulse';
}
