export type ConstraintType =
  | 'max_hours_per_day'
  | 'max_hours_per_week'
  | 'min_rest_between_shifts'
  | 'max_consecutive_shifts'
  | 'max_consecutive_shift_type'
  | 'min_consecutive_days_off'
  | 'max_shifts_per_period_per_week'
  | 'forbidden_shift_sequence'
  | 'employee_unavailable'
  | 'employee_prefers_period'
  | 'employee_avoids_period'
  | 'require_role_per_shift'
  | 'max_weekend_shifts_per_month'
  | 'fair_distribution'

export type ConstraintScope =
  | { type: 'global' }
  | { type: 'employee'; employee_id: string }
  | { type: 'role'; role: string }
  | { type: 'period'; period_id: string }

export interface ConstraintJSON {
  type: ConstraintType
  scope: ConstraintScope
  params: Record<string, unknown>
  hard: boolean
  weight?: number
  natural_language_summary: string
}

export interface ParsedConstraintResult {
  constraints: ConstraintJSON[]
  ambiguities: string[]
}
