package com.isidroid.c23.ui.screen.content

import android.net.Uri
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 ContentContract {
    sealed interface Event : ViewEvent {
        data class PickContent(val photo: Boolean = false, val documents: Boolean = false) : Event
        data class MultipleContents(val uris: List<Uri>) : Event
        data class OpenMap(val lat: Double? = null, val lng: Double? = null, val spotCode: String? = null) : Event
        data object GoBack: Event
    }

    sealed interface Effect : ViewSideEffect {
        sealed interface Navigation : Effect {
            data class ToRenderPreview(val uris: String) : Navigation
            data class ToMap(val lat: Double? = null, val lng: Double? = null, val spotId: String? = null) : Navigation
            data object ToBack: Navigation
        }
    }

    data class State(
        val galleryHash: String? = null,
        val documentHash: String? = null,
        val richSpot: RichSpot? = null

    ) : ViewState
}