import type { Feature, Polygon } from 'geojson'

export type CropType = 'wheat' | 'canola' | 'saffron'

export const CROP_COLORS: Record<CropType, string> = {
  wheat: '#6bcb77',
  canola: '#ffd93d',
  saffron: '#9b59b6'
}

export type LayerType = 'crops' | 'waterNeed' | 'soilQuality' | 'cultivationRisk'

export interface ZoneData {
  id: string
  crop: CropType
  matchPercent: number
  waterNeed: string
  estimatedProfit: string
  reason: string
  criteria: { name: string; value: number }[]
}

export interface ZoneFeatureProperties {
  zoneId: string
  crop: CropType
  matchPercent: number
  waterNeed: string
  estimatedProfit: string
  reason: string
  criteria: { name: string; value: number }[]
}

export type ZoneFeature = Feature<Polygon, ZoneFeatureProperties>
