export function prefetchMobileRoutes() {
  if (typeof window === 'undefined') return;

  const schedule = (callback: () => void) => {
    if ('requestIdleCallback' in window) {
      (window as any).requestIdleCallback(callback);
      return;
    }
    (window as any).setTimeout(callback, 1200);
  };

  schedule(() => {
    void import('./DashboardPage');
    void import('./EventsPage');
    void import('./EventControlRoomPage');
    void import('./EventTasksPage');
    void import('./NotificationsPage');
    void import('./ProfilePage');
    void import('./SettingsPage');
    void import('./welcome/WelcomeLandingPage');
    void import('./welcome/WelcomePackagesPage');
    void import('./welcome/WelcomeSummaryPage');
    void import('./welcome/WelcomeEventPage');
  });
}
