// Quality label constants matching the backend HookManualQualityLabel.Label choices
export const QualityLabels = {
  CHAMPION: 'champion',
  PROMOTE: 'promote',
  APPROVED: 'approved',
  CONDITIONAL: 'conditional',
  SUPPRESS: 'suppress',
} as const;

export type QualityLabel = (typeof QualityLabels)[keyof typeof QualityLabels];

// Helper function to check if a hook has a specific quality label
export function hasQualityLabel(
  humanRating: string | null | undefined,
  label: string
): boolean {
  return humanRating === label;
}

// Helper function to get current quality label (null if none)
export function getCurrentQualityLabel(
  humanRating: string | null | undefined
): string | null {
  return humanRating || null;
}
