import client from './client'

export interface MeteoDay {
  date: string
  t_max?: number
  t_min?: number
  pluie_mm: number
  vent_kmh: number
  code: number
  label: string
  icone: string
}

export const meteoApi = {
  getForecast: (days = 14) => client.get<{ days: MeteoDay[] }>('/api/meteo', { params: { days } }).then(r => r.data),
}
