export type FullStatusAlert = {
  level: 'warn' | 'error'
  message: string
}

export type FullStatusResponse = {
  site: { id: number; code: string; name: string }
  operating_mode: {
    mode_code: string | null
    mode_name: string | null
    activated_at: string | null
    activated_by: string | null
  }
  heartbeat: {
    last_seen: string | null
    age_seconds: number | null
    status: string | null
  }
  telemetry: {
    inverter: {
      pv_power_w: number | null
      battery_soc_pct: number | null
      grid_power_w: number | null
      measured_at: string | null
      age_seconds: number | null
    }
    ev_chargers: { code: string; status: string | null; power_w: number | null }[]
    heat_pump: {
      power_w: number | null
      tank_temp_c: number | null
      measured_at: string | null
    }
  }
  planning: {
    has_active_plan: boolean
    plan_created_at: string | null
    next_interval_start: string | null
    next_battery_setpoint_w: number | null
  }
  alerts: FullStatusAlert[]
}
