import type { RouteDefinition } from '../../core/router.js';
import {
  assetAccessEventsAdminRoute,
  assetSecurityScanEventsAdminRoute,
  assetsAdminRoute,
  confirmAssetUploadRoute,
  signAssetDownloadAdminRoute,
  signAssetPreviewAdminRoute,
  signAssetUploadRoute,
  upsertAssetRoute,
} from './assets.js';
import {
  importHandbookRoute,
  importJobDetailRoute,
  importIssuesRoute,
  importJobsRoute,
  importQuestionsRoute,
  importScorelineRoute,
  importVideosRoute,
  importVocabularyRoute,
  previewHandbookImportRoute,
  previewQuestionsImportRoute,
  previewScorelineImportRoute,
  previewVideosImportRoute,
  previewVocabularyImportRoute,
} from './imports.js';
import {
  importPostCheckRoute,
  importPostCheckStatusRoute,
} from './import-postcheck.js';
import {
  importFieldMappingRoute,
  importTemplateRoute,
} from './import-templates.js';
import {
  createQuestionExportRoute,
  questionExportJobsRoute,
} from './exports.js';
import {
  mediaAnalyticsSummaryRoute,
  mediaAssetAccessEventsRoute,
  mediaVideoPlayEventsRoute,
} from './media-analytics.js';
import {
  contentEntriesAdminRoute,
  contentNodesAdminRoute,
  practiceBlueprintsAdminRoute,
  questionCollectionsAdminRoute,
  replaceQuestionCollectionItemsRoute,
  upsertContentEntryRoute,
  upsertContentNodeRoute,
  upsertPracticeBlueprintRoute,
  upsertQuestionCollectionRoute,
} from './navigation.js';
import {
  adoptPublicQuestionBankRoute,
  publicQuestionBankConflictsRoute,
  publicQuestionBanksRoute,
  tenantContentNotificationsRoute,
  resolvePublicQuestionBankConflictsRoute,
  resolvePublicQuestionBankConflictRoute,
  syncPublicQuestionBankRoute,
  updateTenantContentNotificationStatusRoute,
} from './public-banks.js';
import {
  bindQuestionVideoRoute,
  createQuestionRoute,
  handbookChaptersAdminRoute,
  handbookEntriesAdminRoute,
  handbookSubjectsAdminRoute,
  scorelineFieldsAdminRoute,
  scorelineMajorsAdminRoute,
  scorelineRecordsAdminRoute,
  scorelineSchoolsAdminRoute,
  updateQuestionRoute,
  upsertHandbookChapterRoute,
  upsertHandbookEntryRoute,
  upsertHandbookSubjectRoute,
  upsertScorelineFieldRoute,
  upsertScorelineMajorRoute,
  upsertScorelineRecordRoute,
  upsertScorelineSchoolRoute,
  upsertVideoRoute,
  upsertVocabularyUnitRoute,
  upsertVocabularyWordRoute,
  videosAdminRoute,
  vocabularyUnitsAdminRoute,
  vocabularyWordsAdminRoute,
} from './routes.js';

export const tenantContentRoutes: RouteDefinition[] = [
  ['GET', '/api/tenant-content/content-entries', contentEntriesAdminRoute],
  ['GET', '/api/tenant-content/public-question-banks', publicQuestionBanksRoute],
  ['GET', '/api/tenant-content/notifications', tenantContentNotificationsRoute],
  ['POST', '/api/tenant-content/notifications/status', updateTenantContentNotificationStatusRoute],
  ['POST', '/api/tenant-content/public-question-banks/adopt', adoptPublicQuestionBankRoute],
  ['POST', '/api/tenant-content/public-question-banks/sync', syncPublicQuestionBankRoute],
  ['GET', '/api/tenant-content/public-question-banks/conflicts', publicQuestionBankConflictsRoute],
  ['POST', '/api/tenant-content/public-question-banks/conflicts/resolve', resolvePublicQuestionBankConflictRoute],
  ['POST', '/api/tenant-content/public-question-banks/conflicts/resolve-batch', resolvePublicQuestionBankConflictsRoute],
  ['PUT', '/api/tenant-content/content-entries', upsertContentEntryRoute],
  ['GET', '/api/tenant-content/content-nodes', contentNodesAdminRoute],
  ['PUT', '/api/tenant-content/content-nodes', upsertContentNodeRoute],
  ['GET', '/api/tenant-content/question-collections', questionCollectionsAdminRoute],
  ['PUT', '/api/tenant-content/question-collections', upsertQuestionCollectionRoute],
  ['PUT', '/api/tenant-content/question-collections/items', replaceQuestionCollectionItemsRoute],
  ['GET', '/api/tenant-content/practice-blueprints', practiceBlueprintsAdminRoute],
  ['PUT', '/api/tenant-content/practice-blueprints', upsertPracticeBlueprintRoute],
  ['POST', '/api/tenant-content/questions', createQuestionRoute],
  ['PATCH', '/api/tenant-content/questions', updateQuestionRoute],
  ['GET', '/api/tenant-content/assets', assetsAdminRoute],
  ['GET', '/api/tenant-content/assets/access-events', assetAccessEventsAdminRoute],
  ['GET', '/api/tenant-content/assets/security-scan-events', assetSecurityScanEventsAdminRoute],
  ['GET', '/api/tenant-content/media-analytics/summary', mediaAnalyticsSummaryRoute],
  ['GET', '/api/tenant-content/media-analytics/asset-events', mediaAssetAccessEventsRoute],
  ['GET', '/api/tenant-content/media-analytics/video-events', mediaVideoPlayEventsRoute],
  ['PUT', '/api/tenant-content/assets', upsertAssetRoute],
  ['POST', '/api/tenant-content/assets/sign-upload', signAssetUploadRoute],
  ['POST', '/api/tenant-content/assets/confirm-upload', confirmAssetUploadRoute],
  ['POST', '/api/tenant-content/assets/sign-download', signAssetDownloadAdminRoute],
  ['POST', '/api/tenant-content/assets/sign-preview', signAssetPreviewAdminRoute],
  ['POST', '/api/tenant-content/imports/preview/questions', previewQuestionsImportRoute],
  ['POST', '/api/tenant-content/imports/questions', importQuestionsRoute],
  ['POST', '/api/tenant-content/imports/preview/vocabulary', previewVocabularyImportRoute],
  ['POST', '/api/tenant-content/imports/vocabulary', importVocabularyRoute],
  ['POST', '/api/tenant-content/imports/preview/handbook', previewHandbookImportRoute],
  ['POST', '/api/tenant-content/imports/handbook', importHandbookRoute],
  ['POST', '/api/tenant-content/imports/preview/scoreline', previewScorelineImportRoute],
  ['POST', '/api/tenant-content/imports/scoreline', importScorelineRoute],
  ['POST', '/api/tenant-content/imports/preview/videos', previewVideosImportRoute],
  ['POST', '/api/tenant-content/imports/videos', importVideosRoute],
  ['GET', '/api/tenant-content/imports', importJobsRoute],
  ['GET', '/api/tenant-content/imports/detail', importJobDetailRoute],
  ['GET', '/api/tenant-content/imports/issues', importIssuesRoute],
  ['GET', '/api/tenant-content/imports/field-mapping', importFieldMappingRoute],
  ['GET', '/api/tenant-content/imports/templates', importTemplateRoute],
  ['POST', '/api/tenant-content/imports/post-check', importPostCheckRoute],
  ['GET', '/api/tenant-content/imports/post-check', importPostCheckStatusRoute],
  ['POST', '/api/tenant-content/exports/questions', createQuestionExportRoute],
  ['GET', '/api/tenant-content/exports/jobs', questionExportJobsRoute],
  ['GET', '/api/tenant-content/videos', videosAdminRoute],
  ['PUT', '/api/tenant-content/videos', upsertVideoRoute],
  ['POST', '/api/tenant-content/question-videos', bindQuestionVideoRoute],
  ['GET', '/api/tenant-content/scoreline/schools', scorelineSchoolsAdminRoute],
  ['PUT', '/api/tenant-content/scoreline/schools', upsertScorelineSchoolRoute],
  ['GET', '/api/tenant-content/scoreline/majors', scorelineMajorsAdminRoute],
  ['PUT', '/api/tenant-content/scoreline/majors', upsertScorelineMajorRoute],
  ['GET', '/api/tenant-content/scoreline/fields', scorelineFieldsAdminRoute],
  ['PUT', '/api/tenant-content/scoreline/fields', upsertScorelineFieldRoute],
  ['GET', '/api/tenant-content/scoreline/records', scorelineRecordsAdminRoute],
  ['PUT', '/api/tenant-content/scoreline/records', upsertScorelineRecordRoute],
  ['GET', '/api/tenant-content/vocabulary-units', vocabularyUnitsAdminRoute],
  ['PUT', '/api/tenant-content/vocabulary-units', upsertVocabularyUnitRoute],
  ['GET', '/api/tenant-content/vocabulary-words', vocabularyWordsAdminRoute],
  ['PUT', '/api/tenant-content/vocabulary-words', upsertVocabularyWordRoute],
  ['GET', '/api/tenant-content/handbook-subjects', handbookSubjectsAdminRoute],
  ['PUT', '/api/tenant-content/handbook-subjects', upsertHandbookSubjectRoute],
  ['GET', '/api/tenant-content/handbook-chapters', handbookChaptersAdminRoute],
  ['PUT', '/api/tenant-content/handbook-chapters', upsertHandbookChapterRoute],
  ['GET', '/api/tenant-content/handbook-entries', handbookEntriesAdminRoute],
  ['PUT', '/api/tenant-content/handbook-entries', upsertHandbookEntryRoute],
];
