/**
 * Shared status label and variant maps.
 *
 * Import the relevant constants into page components instead of redeclaring
 * them inline. Each domain exports its own STATUS_LABELS (and STATUS_VARIANTS
 * where a Badge is rendered).
 */

// ---------------------------------------------------------------------------
// Job / Report status  (pending → processing → completed | failed)
// ---------------------------------------------------------------------------

export const JOB_STATUS_LABELS: Record<string, string> = {
  pending: 'Pending',
  processing: 'Processing',
  completed: 'Completed',
  failed: 'Failed',
};

export const JOB_STATUS_VARIANTS: Record<
  string,
  'default' | 'secondary' | 'success' | 'destructive'
> = {
  pending: 'secondary',
  processing: 'default',
  completed: 'success',
  failed: 'destructive',
};

// ---------------------------------------------------------------------------
// Content brief status  (pending → generating → completed | failed)
// ---------------------------------------------------------------------------

export const BRIEF_STATUS_LABELS: Record<string, string> = {
  pending: 'Pending',
  generating: 'Generating',
  completed: 'Completed',
  failed: 'Failed',
};

export const BRIEF_STATUS_VARIANTS: Record<
  string,
  'default' | 'secondary' | 'success' | 'destructive'
> = {
  pending: 'secondary',
  generating: 'default',
  completed: 'success',
  failed: 'destructive',
};

// ---------------------------------------------------------------------------
// SEO calendar entry status
// ---------------------------------------------------------------------------

export const CALENDAR_STATUS_LABELS: Record<string, string> = {
  planned: 'Planned',
  in_progress: 'In Progress',
  completed: 'Completed',
  overdue: 'Overdue',
};

// ---------------------------------------------------------------------------
// Traffic alert status
// ---------------------------------------------------------------------------

export const ALERT_STATUS_LABELS: Record<string, string> = {
  unacknowledged: 'Unacknowledged',
  acknowledged: 'Acknowledged',
  dismissed: 'Dismissed',
};

// ---------------------------------------------------------------------------
// Feature request status (user-facing — all statuses an admin may set)
// ---------------------------------------------------------------------------

export const FEATURE_REQUEST_STATUS_LABELS: Record<string, string> = {
  open: 'Open',
  pending: 'Pending',
  under_review: 'Under Review',
  planned: 'Planned',
  in_progress: 'In Progress',
  building: 'Building',
  shipped: 'Shipped',
  declined: 'Declined',
};

export const FEATURE_REQUEST_STATUS_VARIANTS: Record<
  string,
  'default' | 'secondary' | 'outline' | 'destructive' | 'success'
> = {
  open: 'outline',
  pending: 'outline',
  under_review: 'secondary',
  planned: 'secondary',
  in_progress: 'secondary',
  building: 'secondary',
  shipped: 'success',
  declined: 'destructive',
};

// ---------------------------------------------------------------------------
// Feature request status (admin — full set including in_progress / declined)
// ---------------------------------------------------------------------------

export const ADMIN_FEATURE_REQUEST_STATUS_LABELS: Record<string, string> = {
  open: 'Open',
  pending: 'Pending',
  under_review: 'Under Review',
  planned: 'Planned',
  in_progress: 'In Progress',
  building: 'Building',
  shipped: 'Shipped',
  declined: 'Declined',
};

// ---------------------------------------------------------------------------
// Recommendation lifecycle status
// ---------------------------------------------------------------------------

export const LIFECYCLE_STATUS_LABELS: Record<string, string> = {
  pending: 'Pending',
  reviewed: 'Reviewed',
  approved: 'Approved',
  rejected: 'Rejected',
  deferred: 'Deferred',
  applied: 'Applied',
  tracking: 'Tracking',
};
