export interface DamageZone {
  zone: VehicleZone
  severity: 'SCRATCH' | 'DENT' | 'CRACK' | 'MISSING' | 'OTHER'
  note?: string
}

export type VehicleZone =
  | 'hood' | 'roof' | 'trunk'
  | 'front-left-door' | 'front-right-door'
  | 'rear-left-door' | 'rear-right-door'
  | 'front-left-fender' | 'front-right-fender'
  | 'rear-left-fender' | 'rear-right-fender'
  | 'front-bumper' | 'rear-bumper'
  | 'windshield' | 'rear-window'
  | 'left-mirror' | 'right-mirror'
  | 'front-left-wheel' | 'front-right-wheel'
  | 'rear-left-wheel' | 'rear-right-wheel'
  | 'interior' | 'under-hood' | 'undercarriage'

export const DAMAGE_ZONE_COORDS: Record<VehicleZone, { x: number; y: number; w: number; h: number }> = {
  'hood':               { x: 48,  y: 8,   w: 64, h: 28 },
  'roof':               { x: 48,  y: 52,  w: 64, h: 56 },
  'trunk':              { x: 48,  y: 124, w: 64, h: 28 },
  'front-bumper':       { x: 48,  y: 0,   w: 64, h: 10 },
  'rear-bumper':        { x: 48,  y: 150, w: 64, h: 10 },
  'front-left-fender':  { x: 20,  y: 10,  w: 30, h: 35 },
  'front-right-fender': { x: 110, y: 10,  w: 30, h: 35 },
  'front-left-door':    { x: 20,  y: 52,  w: 30, h: 30 },
  'front-right-door':   { x: 110, y: 52,  w: 30, h: 30 },
  'rear-left-door':     { x: 20,  y: 82,  w: 30, h: 30 },
  'rear-right-door':    { x: 110, y: 82,  w: 30, h: 30 },
  'rear-left-fender':   { x: 20,  y: 112, w: 30, h: 35 },
  'rear-right-fender':  { x: 110, y: 112, w: 30, h: 35 },
  'windshield':         { x: 52,  y: 38,  w: 56, h: 18 },
  'rear-window':        { x: 52,  y: 104, w: 56, h: 18 },
  'left-mirror':        { x: 8,   y: 50,  w: 14, h: 10 },
  'right-mirror':       { x: 138, y: 50,  w: 14, h: 10 },
  'front-left-wheel':   { x: 10,  y: 24,  w: 22, h: 26 },
  'front-right-wheel':  { x: 128, y: 24,  w: 22, h: 26 },
  'rear-left-wheel':    { x: 10,  y: 110, w: 22, h: 26 },
  'rear-right-wheel':   { x: 128, y: 110, w: 22, h: 26 },
  'interior':           { x: 55,  y: 58,  w: 50, h: 44 },
  'under-hood':         { x: 52,  y: 10,  w: 56, h: 20 },
  'undercarriage':      { x: 52,  y: 130, w: 56, h: 20 },
}

export const SEVERITY_COLORS: Record<DamageZone['severity'], string> = {
  SCRATCH: '#F59E0B',
  DENT:    '#EF4444',
  CRACK:   '#8B5CF6',
  MISSING: '#374151',
  OTHER:   '#6B7280',
}
