// COMPILE-TIME STUB — see ../MapMap.kt header. `-PskipMapmap` builds only.
package ai.mapmap.nav

import ai.mapmap.LocationProvider
import ai.mapmap.routing.Route
import ai.mapmap.stubOnly
import android.content.Context
import kotlinx.coroutines.flow.Flow

/** One tick of a guidance session. `maneuverType` is a Valhalla type code. */
class NavigationState(
  val latitude: Double,
  val longitude: Double,
  val bearingDegrees: Double,
  val speedMps: Double,
  val bannerPrimary: String?,
  val bannerSecondary: String?,
  val maneuverType: Int,
  val roundaboutExitCount: Int?,
  val thenBannerPrimary: String?,
  val thenManeuverType: Int?,
  val distanceToManeuverMeters: Double,
  val remainingDistanceMeters: Double,
  val remainingDurationSeconds: Double,
  val isOffRoute: Boolean,
  val isRerouting: Boolean,
  val hasArrived: Boolean,
)

/**
 * Guidance sessions as Flow<NavigationState> (0.2.0 surface summary): the
 * returned cold flow starts the session on collection and tears it down on
 * cancellation.
 */
class NavigationEngine(val route: Route) {
  fun session(locations: LocationProvider): Flow<NavigationState> = stubOnly()
}

/** Spoken prompts via android.speech.tts.TextToSpeech. */
class VoiceGuidance(val context: Context) {
  var muted: Boolean = false
  var volume: Float = 1.0f

  /** Feed each navigation update; speaks when a prompt is due. */
  fun handle(update: NavigationState) {
    stubOnly()
  }

  /** Stop speech and release the TTS engine. */
  fun stop() {
    stubOnly()
  }
}
