import type { RouteDefinition } from '../../core/router.js';
import {
  confirmInvoicePaymentRoute,
  createInvoiceRoute,
  createSubscriptionRoute,
  createTenantInvoiceFromSubscriptionRoute,
  createTenantInvoicesBatchFromSubscriptionsRoute,
  createTenantInvoicesFromUsageOverageRoute,
  createTenantRoute,
  invoiceRemindersRoute,
  platformAuditAlertRulesRoute,
  platformAuditAlertsRoute,
  platformAuditNotificationChannelsRoute,
  platformAuditNotificationEventsRoute,
  platformAuditLogsExportRoute,
  platformAuditLogsRoute,
  platformDunningNotificationChannelsRoute,
  platformDunningNotificationEventsRoute,
  platformOverviewRoute,
  platformPermissionsRoute,
  platformPlansRoute,
  platformQuestionBanksRoute,
  publicQuestionBankSyncStatusRoute,
  platformStaffRoute,
  processOverdueInvoicesRoute,
  questionBankGrantsRoute,
  recordUsageRoute,
  subscriptionInvoiceCandidatesRoute,
  usageOverageInvoiceCandidatesRoute,
  tenantDetailRoute,
  tenantInvoicesRoute,
  tenantsRoute,
  tenantUsageRoute,
  updatePlatformStaffStatusRoute,
  updatePlatformAuditAlertStatusRoute,
  updateTenantStatusRoute,
  upsertPlatformStaffRoute,
  upsertPlatformAuditNotificationChannelRoute,
  upsertPlatformDunningNotificationChannelRoute,
  upsertQuestionBankGrantRoute,
  upsertBillingProfileRoute,
} from './routes.js';

export const platformAdminRoutes: RouteDefinition[] = [
  ['GET', '/api/platform-admin/permissions', platformPermissionsRoute],
  ['GET', '/api/platform-admin/staff', platformStaffRoute],
  ['PUT', '/api/platform-admin/staff', upsertPlatformStaffRoute],
  ['PATCH', '/api/platform-admin/staff/status', updatePlatformStaffStatusRoute],
  ['GET', '/api/platform-admin/overview', platformOverviewRoute],
  ['GET', '/api/platform-admin/plans', platformPlansRoute],
  ['GET', '/api/platform-admin/question-banks', platformQuestionBanksRoute],
  ['GET', '/api/platform-admin/question-bank-grants', questionBankGrantsRoute],
  ['GET', '/api/platform-admin/question-bank-sync-status', publicQuestionBankSyncStatusRoute],
  ['PUT', '/api/platform-admin/question-bank-grants', upsertQuestionBankGrantRoute],
  ['GET', '/api/platform-admin/tenants', tenantsRoute],
  ['POST', '/api/platform-admin/tenants', createTenantRoute],
  ['GET', '/api/platform-admin/tenants/detail', tenantDetailRoute],
  ['PATCH', '/api/platform-admin/tenants/status', updateTenantStatusRoute],
  ['PUT', '/api/platform-admin/tenants/billing-profile', upsertBillingProfileRoute],
  ['GET', '/api/platform-admin/audit-logs', platformAuditLogsRoute],
  ['GET', '/api/platform-admin/audit-logs/export', platformAuditLogsExportRoute],
  ['GET', '/api/platform-admin/audit-alert-rules', platformAuditAlertRulesRoute],
  ['GET', '/api/platform-admin/audit-alerts', platformAuditAlertsRoute],
  ['POST', '/api/platform-admin/audit-alerts/status', updatePlatformAuditAlertStatusRoute],
  ['GET', '/api/platform-admin/audit-notification-channels', platformAuditNotificationChannelsRoute],
  ['PUT', '/api/platform-admin/audit-notification-channels', upsertPlatformAuditNotificationChannelRoute],
  ['GET', '/api/platform-admin/audit-notification-events', platformAuditNotificationEventsRoute],
  ['GET', '/api/platform-admin/dunning-notification-channels', platformDunningNotificationChannelsRoute],
  ['PUT', '/api/platform-admin/dunning-notification-channels', upsertPlatformDunningNotificationChannelRoute],
  ['GET', '/api/platform-admin/dunning-notification-events', platformDunningNotificationEventsRoute],
  ['POST', '/api/platform-admin/subscriptions', createSubscriptionRoute],
  ['GET', '/api/platform-admin/invoices', tenantInvoicesRoute],
  ['POST', '/api/platform-admin/invoices', createInvoiceRoute],
  ['GET', '/api/platform-admin/invoices/subscription-candidates', subscriptionInvoiceCandidatesRoute],
  ['GET', '/api/platform-admin/invoices/usage-overage-candidates', usageOverageInvoiceCandidatesRoute],
  ['POST', '/api/platform-admin/invoices/from-subscription', createTenantInvoiceFromSubscriptionRoute],
  ['POST', '/api/platform-admin/invoices/from-subscriptions-batch', createTenantInvoicesBatchFromSubscriptionsRoute],
  ['POST', '/api/platform-admin/invoices/from-usage-overage', createTenantInvoicesFromUsageOverageRoute],
  ['POST', '/api/platform-admin/invoices/process-overdue', processOverdueInvoicesRoute],
  ['GET', '/api/platform-admin/invoices/reminders', invoiceRemindersRoute],
  ['POST', '/api/platform-admin/invoices/payments/manual-confirm', confirmInvoicePaymentRoute],
  ['GET', '/api/platform-admin/usage', tenantUsageRoute],
  ['POST', '/api/platform-admin/usage', recordUsageRoute],
];
