import type { RouteDefinition } from '../../core/router.js';
import {
  commissionOrdersRoute,
  commissionSettingsRoute,
  commissionSettlementExportRoute,
  commissionSettlementProofsRoute,
  commissionSettlementsRoute,
  commissionSummaryRoute,
  createCommissionSettlementProofRoute,
  generateCommissionSettlementRoute,
  updateCommissionSettingsRoute,
  updateCommissionSettlementProofStatusRoute,
  updateCommissionSettlementStatusRoute,
  updateMemberCommissionRateRoute,
} from './commission.js';
import {
  crmConfigRoute,
  crmDeadLettersRoute,
  crmQueueActionRoute,
  crmQueueLogsRoute,
  crmQueueRoute,
  referralBindRoute,
  referralConversionReportRoute,
  referralInviteCodeRoute,
  referralManualBindRoute,
  referralQrcodeRoute,
  referralResolveRoute,
  referralSalesClientsRoute,
  referralSalesStatsRoute,
  referralStatsRoute,
  referralTeamRoute,
  referralTrackEventRoute,
  upsertCrmConfigRoute,
  upsertReferralTeamRoute,
} from './routes.js';

export const referralRoutes: RouteDefinition[] = [
  ['POST', '/api/referral/invite-code', referralInviteCodeRoute],
  ['POST', '/api/referral/resolve', referralResolveRoute],
  ['POST', '/api/referral/track-event', referralTrackEventRoute],
  ['POST', '/api/referral/bind', referralBindRoute],
  ['GET', '/api/referral/stats', referralStatsRoute],
  ['GET', '/api/referral/sales-stats', referralSalesStatsRoute],
  ['GET', '/api/referral/conversion-report', referralConversionReportRoute],
  ['GET', '/api/referral/sales-clients', referralSalesClientsRoute],
  ['POST', '/api/referral/manual-bind', referralManualBindRoute],
  ['GET', '/api/referral/team', referralTeamRoute],
  ['PUT', '/api/referral/team', upsertReferralTeamRoute],
  ['POST', '/api/referral/qrcode', referralQrcodeRoute],
  ['GET', '/api/crm/config', crmConfigRoute],
  ['PUT', '/api/crm/config', upsertCrmConfigRoute],
  ['GET', '/api/crm/queue', crmQueueRoute],
  ['GET', '/api/crm/dead-letters', crmDeadLettersRoute],
  ['GET', '/api/crm/queue/logs', crmQueueLogsRoute],
  ['POST', '/api/crm/queue/action', crmQueueActionRoute],
  ['GET', '/api/commission/settings', commissionSettingsRoute],
  ['PUT', '/api/commission/settings', updateCommissionSettingsRoute],
  ['PUT', '/api/commission/member-rate', updateMemberCommissionRateRoute],
  ['GET', '/api/commission/summary', commissionSummaryRoute],
  ['GET', '/api/commission/orders', commissionOrdersRoute],
  ['GET', '/api/commission/settlements', commissionSettlementsRoute],
  ['GET', '/api/commission/settlements/export', commissionSettlementExportRoute],
  ['GET', '/api/commission/settlements/proofs', commissionSettlementProofsRoute],
  ['POST', '/api/commission/settlements/generate', generateCommissionSettlementRoute],
  ['POST', '/api/commission/settlements/status', updateCommissionSettlementStatusRoute],
  ['POST', '/api/commission/settlements/proofs', createCommissionSettlementProofRoute],
  ['POST', '/api/commission/settlements/proofs/status', updateCommissionSettlementProofStatusRoute],
];
