package com.isidroid.c23.ui.screen.map

import com.isidroid.core.vm.ViewEvent
import com.isidroid.core.vm.ViewSideEffect
import com.isidroid.core.vm.ViewState
import com.isidroid.spot.model.RichSpot

class MapContract {
    sealed interface Event : ViewEvent {
        data object PermissionGranted: Event
        data object ToBack: Event
        data object MoveCameraToMyLocation: Event
        data class CameraMove(val lat: Double, val lng: Double, val radius: Int) : Event
        data class ClickOnMarker(val markerId: String?): Event
        data class SelectSpot(val id: String): Event
    }
    sealed interface Effect : ViewSideEffect {
        sealed interface Navigation : Effect {
            data object ToBack: Navigation
            data object ToSelectContent: Navigation
        }
    }

    data class State(
        val lat: Double? = null,
        val lng: Double? = null,
        val requestLocationPermission: Boolean = false,
        val spotCode: String? = null,
        val spotsInfoList: List<RichSpot>? = null
    ) : ViewState
}