import {Navigate, RouteObject} from 'react-router-dom'; import React from 'react'; import {ChannelsDatatablePage} from '@common/admin/channels/channels-datatable-page'; import {EditChannelPage} from '@app/admin/channels/edit-channel-page'; import {CreateChannelPage} from '@app/admin/channels/create-channel-page'; import {NewsDatatablePage} from '@app/admin/news/news-datatable-page'; import {CommentsDatatablePage} from '@common/comments/comments-datatable-page/comments-datatable-page'; import {ReviewsDatatablePage} from '@app/admin/reviews/reviews-datatable-page'; import {VideosDatatablePage} from '@app/admin/videos/videos-datatable-page'; import {CreateVideoPage} from '@app/admin/videos/crupdate/create-video-page'; import {EditVideoPage} from '@app/admin/videos/crupdate/edit-video-page'; import {TitlesDatatablePage} from '@app/admin/titles/titles-datatable-page'; import {EditTitlePage} from '@app/admin/titles/title-editor/edit-title-page'; import {SeasonEditorEpisodeList} from '@app/admin/titles/title-editor/seasons-editor/season-editor-episode-list'; import {TitleSeasonsEditor} from '@app/admin/titles/title-editor/seasons-editor/title-seasons-editor'; import {TitlePrimaryFactsForm} from '@app/admin/titles/title-editor/title-primary-facts-form'; import {TitleReviewsEditor} from '@app/admin/titles/title-editor/title-reviews-editor'; import {TitleImagesEditor} from '@app/admin/titles/title-editor/title-images-editor'; import {TitleVideosEditor} from '@app/admin/titles/title-editor/videos-editor/title-videos-editor'; import {EpisodePrimaryFactsForm} from '@app/admin/titles/title-editor/episode-editor/episode-primary-facts-form'; import {EpisodeCastEditor} from '@app/admin/titles/title-editor/episode-editor/episode-cast-editor'; import {TitleCastEditor} from '@app/admin/titles/title-editor/credits-editor/title-cast-editor'; import {TitleCrewEditor} from '@app/admin/titles/title-editor/credits-editor/title-crew-editor'; import {SeasonCastEditor} from '@app/admin/titles/title-editor/seasons-editor/season-cast-editor'; import {SeasonCrewEditor} from '@app/admin/titles/title-editor/seasons-editor/season-crew-editor'; import {EpisodeCrewEditor} from '@app/admin/titles/title-editor/episode-editor/episode-crew-editor'; import {TitleTagsEditor} from '@app/admin/titles/title-editor/title-tags-editor/title-tags-editor'; import {GENRE_MODEL} from '@app/titles/models/genre'; import {KEYWORD_MODEL} from '@app/titles/models/keyword'; import {PRODUCTION_COUNTRY_MODEL} from '@app/titles/models/production-country'; import {TitleCommentsEditor} from '@app/admin/titles/title-editor/title-comments-editor'; import {PeopleDatatablePage} from '@app/admin/people/people-datatable-page'; import {CreatePersonPage} from '@app/admin/people/crupdate/create-person-page'; import {UpdatePersonPage} from '@app/admin/people/crupdate/update-person-page'; import {PersonPrimaryFactsForm} from '@app/admin/people/crupdate/person-primary-facts-form'; import {PersonCreditsEditor} from '@app/admin/people/crupdate/person-credits-editor'; import {AuthRoute} from '@common/auth/guards/auth-route'; import {EditNewsArticlePage} from '@app/admin/news/edit-news-article-page'; import {CreateNewsArticlePage} from '@app/admin/news/create-news-article-page'; import {TitleTagsDatatablePage} from '@app/admin/title-tags/title-tags-editor/title-tags-datatable-page'; import {ListsDatatablePage} from '@app/admin/lists/lists-datatable-page'; import {CreateUserListPage} from '@app/user-lists/pages/create-user-list-page'; import {EditUserListPage} from '@app/user-lists/pages/edit-user-list-page'; import {MtdbAdminReportPage} from '@app/admin/reports/mtdb-admin-report-page'; import {AdminInsightsReport} from '@app/admin/reports/admin-insights-report'; import {AdminVisitorsReport} from '@app/admin/reports/admin-visitors-report'; import {TitleInsightsPage} from '@app/admin/reports/pages/title-insights-page'; import {EpisodeInsightsPage} from '@app/admin/reports/pages/episode-insights-page'; import {SeasonInsightsPage} from '@app/admin/reports/pages/season-insights-page'; import {VideoInsightsPage} from '@app/admin/reports/pages/video-insights-page'; export const AppAdminRoutes: RouteObject[] = [ // Reports { path: '/', element: , children: [ {index: true, element: }, {path: 'plays', element: }, {path: 'visitors', element: }, ], }, // Channels { path: 'channels', element: , }, { path: 'channels/new', element: , }, { path: 'channels/:slugOrId/edit', element: , }, // User lists { path: 'lists', element: , }, { path: 'lists/new', element: , }, { path: 'lists/:slugOrId/edit', element: , }, // People { path: 'people', element: , }, { path: 'people/new', element: , }, { path: 'people/:personId/edit', element: , children: [ { index: true, element: , }, { path: 'primary-facts', element: , }, { path: 'credits', element: , }, ], }, // Titles { path: 'titles', element: , }, { path: 'titles/new', element: , }, { path: 'videos/:videoId/insights', element: , }, { path: 'titles/:titleId/insights', element: , }, { path: 'titles/:titleId/insights/seasons/:season', element: , }, { path: 'titles/:titleId/insights/seasons/:season/episodes/:episode', element: , }, { path: 'titles/:titleId/edit', element: , }, { path: 'titles/:titleId/edit', element: , children: [ { index: true, element: , }, { path: 'primary-facts', element: , }, { path: 'reviews', element: , }, { path: 'comments', element: , }, { path: 'images', element: , }, { path: 'genres', element: , }, { path: 'keywords', element: , }, { path: 'countries', element: , }, { path: 'cast', element: , }, { path: 'crew', element: , }, { path: 'videos', element: , }, { path: 'videos/seasons/:season', element: , }, { path: 'videos/seasons/:season/episodes/:episode', element: , }, // SEASONS { path: 'seasons', element: , }, { path: 'seasons/:season', children: [ { index: true, element: , }, { path: 'Episodes', element: , }, { path: 'cast', element: , }, { path: 'crew', element: , }, ], }, // EPISODES { path: 'seasons/:season/episodes/new', element: , }, { path: 'seasons/:season/episodes/:episode', children: [ { index: true, element: , }, { path: 'primary-facts', element: , }, { path: 'cast', element: , }, { path: 'crew', element: , }, ], }, ], }, // Video editor with no season or episode selected { path: 'titles/:titleId/edit/videos/new', element: , }, { path: 'titles/:titleId/edit/videos/edit/:videoId', element: , }, // Video editor with season selected { path: 'titles/:titleId/edit/videos/seasons/:season/new', element: , }, { path: 'titles/:titleId/edit/videos/seasons/:season/edit/:videoId', element: , }, // Video editor with season and episode selected { path: 'titles/:titleId/edit/videos/seasons/:season/episodes/:episode/new', element: , }, { path: 'titles/:titleId/edit/videos/seasons/:season/episodes/:episode/edit/:videoId', element: , }, // News articles { path: 'news', element: , }, { path: 'news/add', element: ( ), }, { path: 'news/:articleId/edit', element: ( ), }, // Comments { path: 'comments', element: , }, // Reviews { path: 'reviews', element: , }, // Videos { path: 'videos', element: , }, { path: 'videos/new', element: , }, { path: 'videos/:videoId/edit', element: , }, // Title tags { path: 'keywords', element: , }, { path: 'genres', element: , }, ];