import { Routes } from '@angular/router'; export const APP_ROUTES: Routes = [ { path: '', pathMatch: 'full', redirectTo: 't/trending' }, // Theme pages { path: 't/:theme', loadComponent: () => import('./components/themes/theme-page.component').then(m => m.ThemePageComponent), title: 'NewTube - Theme' }, { path: 'p/:provider/t/:theme', loadComponent: () => import('./components/themes/provider-theme-page.component').then(m => m.ProviderThemePageComponent), title: 'NewTube - Provider Theme' }, { path: 'search', loadComponent: () => import('./components/search/search.component').then(m => m.SearchComponent), title: 'NewTube - Search' }, { path: 'shorts', loadComponent: () => import('./components/shorts/watch-short.component').then(m => m.WatchShortComponent), title: 'NewTube - Shorts' }, // Alias de deep-link produits par `routeForVideo` (mêmes pages Watch). { path: 'shorts/:id', loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent), title: 'NewTube - Short' }, { path: 'live/:id', loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent), title: 'NewTube - Live' }, { path: 'channel/:provider/:externalId', loadComponent: () => import('./components/channel/channel-page.component').then(m => m.ChannelPageComponent), title: 'NewTube - Channel' }, { path: 'watch/:id', loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent), title: 'NewTube - Watch' }, // Alias supporting provider in path: /watch/:provider/:id { path: 'watch/:provider/:id', loadComponent: () => import('./components/watch/watch.component').then(m => m.WatchComponent), title: 'NewTube - Watch' }, { path: 'library', pathMatch: 'full', redirectTo: 'library/playlists' }, { path: 'library/playlists', loadComponent: () => import('./components/library/playlists/playlists.component').then(m => m.PlaylistsComponent), title: 'NewTube - Playlists' }, { path: 'library/playlists/:id', loadComponent: () => import('./components/library/playlists/playlist-detail.component').then(m => m.PlaylistDetailComponent), title: 'NewTube - Playlist' }, { path: 'library/liked', loadComponent: () => import('./components/library/liked/liked.component').then(m => m.LikedComponent), title: 'NewTube - Liked' }, { path: 'library/watch-later', loadComponent: () => import('./components/library/liked/liked.component').then(m => m.LikedComponent), data: { list: 'watch-later' }, title: 'NewTube - Watch later' }, { path: 'library/subscriptions', loadComponent: () => import('./components/library/subscriptions/subscriptions.component').then(m => m.SubscriptionsComponent), title: 'NewTube - Subscriptions' }, { path: 'library/import', loadComponent: () => import('./components/library/import/import.component').then(m => m.ImportComponent), title: 'NewTube - Import' }, { path: 'library/downloads/:id', loadComponent: () => import('./components/library/downloads/download-play.component').then(m => m.DownloadPlayComponent), title: 'NewTube - Play download' }, { path: 'library/downloads', loadComponent: () => import('./components/library/downloads/downloads.component').then(m => m.DownloadsComponent), title: 'NewTube - Downloads' }, { path: 'account', pathMatch: 'full', redirectTo: 'account/preferences' }, { path: 'account/preferences', loadComponent: () => import('./components/account/preferences/preferences.component').then(m => m.PreferencesComponent), title: 'NewTube - Preferences' }, { path: 'account/history', loadComponent: () => import('./components/account/history/history.component').then(m => m.HistoryComponent), title: 'NewTube - History' }, { path: 'account/sessions', loadComponent: () => import('./components/account/sessions/sessions.component').then(m => m.SessionsComponent), title: 'NewTube - Sessions' }, { path: 'auth/login', loadComponent: () => import('./components/auth/login/login.component').then(m => m.LoginComponent), title: 'NewTube - Login' }, { path: 'auth/register', loadComponent: () => import('./components/auth/register/register.component').then(m => m.RegisterComponent), title: 'NewTube - Register' }, { path: 'auth/google/callback', loadComponent: () => import('./components/auth/google-callback/google-callback.component').then(m => m.GoogleCallbackComponent), title: 'NewTube - Google login' }, { path: 'info/utilisation', loadComponent: () => import('./components/info/utilisation/utilisation.component').then(m => m.UtilisationComponent), title: 'NewTube - Utilisation' }, { path: '**', redirectTo: '' } ];